How to read specific value from the hdf5 file.
3 views (last 30 days)
Show older comments
I have hdf5 file, with the contents showns:
data = h5read('check_v1_c1.h5','/coordinates',[1.00 1.00],count)
data(:,:,1) =
1193262 1193267 1193277 1193287 1193297
data(:,:,2) =
0.1737 0.1741 0.1749 0.1759 0.1770
data(:,:,3) =
0.0314 0.0318 0.0326 0.0336 0.0346
I want to extract the values of data(:,:,1),data(:,:,2) and data(:,:,3), based on the values of data(:,:,1). Like for example, how can I extract the data data(:,:,1) between 1193267 to 1193287 so my output would be something like this:
data(:,:,1) 1193267 1193277 1193287
data(:,:,2) 0.1741 0.1749 0.1759
data(:,:,3) 0.0318 0.0326 0.0336
2 Comments
Accepted Answer
Walter Roberson
on 15 Aug 2022
That facility is not available for HDF.
You can modify the count to 1 for the third dimension to read in only (:, :, 1). Then you can examine those to locate portions of interest and go back to read the variable with appropriate start and count for the subsection.
0 Comments
More Answers (0)
See Also
Categories
Find more on HDF5 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!