I have a .h5 file of size 128x128x64, hdf5read or h5read command is reading 64x128x128, I want MATLAB to read original size of the file, can you please help me?
8 views (last 30 days)
Show older comments
data = h5read( 'Soln_700.00279.h5','/T')
or
file = hdf5info('Soln_700.00279.h5')
data_P = hdf5read(file.GroupHierarchy.Datasets(1))
I have tried above both commands, but MATLAB is reading the size in reverse I guess, but I do not know which column is x and y, except z that I know is of size 64. I would appreciate any help.
Thank you
0 Comments
Answers (1)
Walter Roberson
on 26 Jul 2022
You need to examine the hdf5info that is returned, looking at the dimensions information for file.GroupHierarchy.Datasets(1) to try to figure out which is x and which is y.
The most common arrangement in hdf5 files is x, y, z -- which is not the same as what MATLAB uses. MATLAB uses y, x, z so it is common to see something like
data_P = permute(data_P, [2 1 3]);
See Also
Categories
Find more on Text Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!