Hello, I have a problem reading an h5 file.
I just want to read a Data table(Scalar Dataset) from the file using the Matlab code:
filepath = 'D:\QMDownload\3\new.h5'; plist = 'H5P_DEFAULT'; fid = H5F.open(filepath); dataset_id = H5D.open(fid,'/Scene8/Data'); data = H5D.read(dataset_id); H5D.close(dset_id); H5F.close(fid);
The data I got is empty. So I open in HDF5 viewer to see why it is empty. When I double-click /Scene8/Data to show this table in HDF viewer, it takes more than 40 seconds to respond. (However, other Dataset in this file opens immediately no matter big or small). This table was strange that it has only 1 cell. I found that the cell has a very long explicit string typing 88411 numbers joined by comma. When I copy the long string and input into Matlab command window, I get a vector with 1x88411. When I convert it to AscII, I found that it is a standard long xml document.
My problem is that although I can read all the other dataset and attributes in this file, I cannot read this table into Matlab workspace by code above. It’s always empty.
I tried to delete inside this file all the content except this table. Then I double-click this table again in HDF viewer, however, it says that “could not open dataset ”Data”, dimension is zero”.
Can anyone help me on this problem?
The file is