作者teeo (teeo)
看板MATLAB
标题[问题] 请问该如何画h5档案的图?
时间Tue Jun 19 22:34:29 2012
请问一下
我在跑一个模拟软体MEEP
他跑玩的结果是.h5的档案
而且会出现不只一个.h5档案
我该怎样用matlab来读取这样的群组.h5档
然後,应该怎样才能画图
我在网路上找到这个资讯
%% Read an hdf5 image and plot in MATLAB
%% Load the hdf5 file in MATLAB
info = hdf5info('hdf5_test.h5');
%% Find the addres of the image
% The operation must be done manually and the position inside the structure
% could be variable depending on the structure itself
address_data_1 = info.GroupHierarchy.Groups(3).Datasets(5).Name;
%% Query the database
image1 =hdf5read('hdf5_test.h5',address_data_1);
%% Plot the image
figure
imagesc(image1)
不过在执行info.GroupHierarchy.Groups(3).Datasets(5).Name这边时出现错误
(看不太懂说明的意思)
请问我该怎麽改?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.37.173.190