renamehdf5attribute
Renames an attribute at a given location.
Syntax
renamehdf5attribute(filename, srcAttributeName, destAttributeName)
renamehdf5attribute(filename, datasetPath, srcAttributeName, destAttributeName)
renamehdf5attribute(filename, groupPath, srcAttributeName, destAttributeName)
Inputs
- filename
 - Path to the HDF5 file.
 - datasetPath/groupPath
 - Optional. Fully qualified path of the dataset/group in the file. The file is considered the location if this parameter is not provided.
 - srcAttributeName
 - Source attribute name.
 - destAttributeName
 - Destination attribute name.
 
Example 1
%rename attribute on file
      input_str = 'attribute on file';
      createhdf5attribute('test.h5','attr_on_file',input_str)
      renamehdf5attribute('test.h5','attr_on_file','attr_on_file_renamed')
      
      %rename attribute on dataset
      input_mat=[1,2;3,4];
      createhdf5dataset('test.h5','/QUAD5',input_mat)
      createhdf5attribute('test.h5','/QUAD5','attr_on_dataset',input_mat)
      renamehdf5attribute('test.h5','/QUAD5','attr_on_dataset','attr_on_dataset_renamed')
      
      %rename attribute on group
      x=9;
      createhdf5group('test.h5','/group5')
      createhdf5attribute('test.h5','/group5','attr_on_group',x)
      renamehdf5attribute('test.h5','/group5','attr_on_group','attr_on_group_renamed')