Matlab h5read get errors

조회 수: 35 (최근 30일)
buer
buer 2014년 10월 17일
댓글: Vijay Sagar 2020년 7월 23일
Hi,
When I use
h5read('wo.h5',,'/g4/lat'),
got some errors as below: Error using h5readc The HDF5 library encountered an error and produced the following stack trace information:
H5G_traverse_real component not found
H5G_traverse internal path traversal failed
H5G_loc_find can't find object
H5Dopen2 not found
Error in h5read (line 58) [data,var_class] = h5readc(Filename,Dataset,start,count,stride)
I am using Matlab 2013b, Does it matter with this? Thanks for help.

채택된 답변

per isakson
per isakson 2014년 10월 17일
  • There is a typo, two commas where there should be one.
  • The reason to the error is most likely that '/g4/lat' doesn't exist in your file. A typo?
I have found the program HDF5View very useful when working with HDF5-files. See HDF5 Tutorial: Learning HDF5 with HDFView
Agree, the error messages could have been more user friendly.
A little test with R2013a. The dataset, '/g4/lat', does not exist in 'myh5file.h5'. I get the same error message as you did.
>> h5read('myh5file.h5',,'/g4/lat')
h5read('myh5file.h5',,'/g4/lat')
|
Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
>> h5read('myh5file.h5','/g4/lat')
Error using h5readc
The HDF5 library encountered an error and produced the following stack trace information:
H5G_traverse_real component not found
H5G_traverse internal path traversal failed
H5G_loc_find can't find object
H5Dopen2 not found
Error in h5read (line 59)
[data,var_class] = h5readc(Filename,Dataset,start,count,stride);
>> version
ans =
8.1.0.604 (R2013a)
  댓글 수: 2
hejie
hejie 2019년 4월 23일
Hi,If the dataset, '/g4/lat', does not exist in 'myh5file.h5'.So how should I read an entire data set of this file?
Vijay Sagar
Vijay Sagar 2020년 7월 23일
if parameter does not exist then give nan values wherever exception match.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 HDF5에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by