H5A.delete

Delete attribute

Syntax

H5A.delete(loc_id,name)

Description

H5A.delete(loc_id,name) removes the attribute specified by name from the dataset, group, or named datatype specified by loc_id.

Examples

Delete a root group attribute.

srcFile = fullfile(matlabroot,'toolbox','matlab','demos','example.h5');
copyfile(srcFile,'myfile.h5');
fileattrib('myfile.h5','+w');
fid = H5F.open('myfile.h5','H5F_ACC_RDWR','H5P_DEFAULT');
gid = H5G.open(fid,'/');
H5A.delete(gid,'attr1');
H5G.close(gid);
H5F.close(fid);
Was this topic helpful?