How to read specific value from the hdf5 file.

4 ビュー (過去 30 日間)
MakM
MakM 2022 年 8 月 15 日
編集済み: MakM 2022 年 8 月 16 日
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 件のコメント
dpb
dpb 2022 年 8 月 15 日
What does
whos data
return after the first code line?
MakM
MakM 2022 年 8 月 16 日
編集済み: MakM 2022 年 8 月 16 日
Name Size Bytes Class Attributes
data 1x5x3 120 double

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2022 年 8 月 15 日
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 件)

カテゴリ

Help Center および File ExchangeHDF5 についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by