How to read specific value from the hdf5 file.

5 visualizzazioni (ultimi 30 giorni)
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 Commenti
dpb
dpb il 15 Ago 2022
What does
whos data
return after the first code line?
MakM
MakM il 16 Ago 2022
Modificato: MakM il 16 Ago 2022
Name Size Bytes Class Attributes
data 1x5x3 120 double

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 15 Ago 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.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by