This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Name of referenced object


name = H5R.get_name(loc_id,ref_type,ref)
name = H5R.get_name(loc_id,ref_type,ref,'TextEncoding',encoding)


name = H5R.get_name(loc_id,ref_type,ref) retrieves the name for the object identified by ref. The loc_id argument is the identifier for the dataset containing the reference or for the group containing that dataset. ref_type specifies the type of the reference ref. Valid values for ref_type are 'H5R_OBJECT' or 'H5R_DATASET_REGION'.

name = H5R.get_name(loc_id,ref_type,ref,'TextEncoding',encoding) additionally specifies the text encoding to use to interpret the reference name. Specify encoding as 'system'(default) or 'UTF-8'.

  • 'system' — Use the system default encoding to interpret the reference name.

  • 'UTF-8' — Use UTF-8 encoding to interpret the reference name.


plist = 'H5P_DEFAULT';
space = 'H5S_ALL';
fid ='example.h5');
dset_id =,'/g3/reference');
ref_data =,'H5T_STD_REF_OBJ',space,space,plist);
name = H5R.get_name(dset_id,'H5R_OBJECT',ref_data(:,1));