hdf5 file read problem.
조회 수: 68 (최근 30일)
이전 댓글 표시
Hi, I have a series of cgns files which I want to process in Matlab. I use a command of cgnstools in linux named adf2hdf and also cgnsconvert to convert the cgns files into hdf5 files. I can get the structures with h5info and h5disp, but when I want to use h5read it complains with following error:
Error using h5readc
The HDF5 library encountered an error and produced the following stack trace information:
H5Dopen2 not a dataset
Error in h5read (line 59)
[data,var_class] = h5readc(Filename,Dataset,start,count,stride);
A sample file has been attached. I had to change the extension to png so I can upload it. After download you can change it back to hdf5 but it doesn't really matter for Matlab.
댓글 수: 0
채택된 답변
per isakson
2015년 9월 26일
편집: per isakson
2015년 10월 2일
I would call this a practical joke. There is a leading space in the names of the datasets. (Caveat: This is the first time I encounter the CFD General Notation System.)
You didn't tell what you tried to read, however, try
>> num = h5read( 'h:\m\cssm\xy.h5', '/ format' )'
num =
73 69 69 69 95 76 73 84 84 76 69 95 51 50 0
and
>> num = h5read( 'h:\m\cssm\xy.h5', '/xyplane/sidesplane/ZoneType/ data' )'
num =
85 110 115 116 114 117 99 116 117 114 101 100
This is an excerpt of a h5disp output.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!