Clear Filters
Clear Filters

Bug in HDF5 interface?

2 views (last 30 days)
Kalle
Kalle on 21 Jan 2013
Hi everyone.
I am using Pauli Virtanen's excellent hdf5 script h5load to read hdf5 datafiles which contain data formed in structs.
Now, I get into some trouble when I try to load a .mat file using the simple load('path-to-file-in-question') which fail with the error
attempt to create or open handle failed
??? Error using ==> load
Can't read file
Pauli's script uses the call
loc = H5F.open(filename, 'H5F_ACC_RDONLY', 'H5P_DEFAULT');
try
data = load_one(loc, path_parts, path);
H5F.close(loc);
catch exc
H5F.close(loc);
rethrow(exc);
end
Does the call to H5F somehow affect the call to 'load'?
It gets weirder.
if I do a 'save' from the matlab prompt I get a default file matlab.mat, which I can load without the error mentioned above. However, the file I open from my script now has a hdf5 header,
hdf5info(filename)
ans =
Filename: 'Ofilters1.mat'
LibVersion: '1.6.5'
Offset: 512
FileSize: 474197
GroupHierarchy: [1x1 struct]
Using MATLAB 2007b 64-bit on Windows 7

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!