MATLAB Answers

Problem in opening HDF5 file

5 views (last 30 days)
Imam
Imam on 26 Jan 2015
Answered: Jeremy on 28 Jan 2015
I am new to HDF5 file format and there is a file I want to open. I simply followed what is given by mathworks example:
hinfo = hdf5info('example.h5');
dset = hdf5read(hinfo.GroupHierarchy.Groups(2).Datasets(1));
But MATLAB returned the following message: Improper index matrix reference.
Improper index matrix reference.
Error in HDF5_reader (line 8)
dset = hdf5read(hinfo.GroupHierarchy.Groups(2).Datasets(1));
So what was the problem?

  0 Comments

Sign in to comment.

Answers (3)

Jeremy
Jeremy on 27 Jan 2015
what is returned by hinfo? do you have 2 groups with a data channel in the second group?

  0 Comments

Sign in to comment.


Imam
Imam on 27 Jan 2015
The problem is I got this file from someone else and as I mentioned I am not very familiar with this file format. That's why I don't even know what are contained in this file, what are the name of variables stored there.

  0 Comments

Sign in to comment.


Jeremy
Jeremy on 28 Jan 2015
after to get hinfo, stop and see what is in that structure. It will list the group and dataset hiearchy.

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!