How to read specific value from the hdf5 file.

5 views (last 30 days)
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
dpb
dpb on 15 Aug 2022
What does
whos data
return after the first code line?
MakM
MakM on 16 Aug 2022
Edited: MakM on 16 Aug 2022
Name Size Bytes Class Attributes
data 1x5x3 120 double

Sign in to comment.

Accepted Answer

Walter Roberson
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.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!