I am trying to create a dataset in the HDF5 format with an unspecified dimension (by using the 'H5S_UNLIMITED' option for one of my dimensions) using the following code:
dims = [60 30 10];maxdims = {dims(1), dims(2), 'H5S_UNLIMITED'};spaceID = H5S.create_simple(length(dims),fliplr(dims),fliplr(maxdims));typeID = H5T.copy ('H5T_NATIVE_DOUBLE');dset = H5D.create (fid, 'sourceName', typeID, spaceID, 'H5P_DEFAULT');
However, when I try to run this code, I get the following error:
Error using hdf5lib2
The HDF5 library encountered an error and produced the following stack trace information:
H5D_contig_construct extendible contiguous non-external dataset
H5D_create unable to construct layout information
H5O_dset_create unable to create dataset
H5O_obj_create unable to open object
H5L_link_cb unable to create object
H5G_traverse_real traversal operator failed
H5G_traverse internal path traversal failed
H5L_create_real can't insert link
H5L_link_object unable to create new link to object
H5D_create_named unable to create and link to dataset
H5Dcreate1 unable to create dataset
Error in H5D.create (line 59)
id = H5ML.hdf5lib2('H5Dcreate', varargin{:} );
Error in example2 (line 17)
dset = H5D.create (fid, '/psfSourceName', typeID, spaceID, 'H5P_DEFAULT');
How can I resolve this?
Best Answer