Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

H5I.get_name

Name of object

Syntax

name = H5I.get_name(obj_id)

Description

name = H5I.get_name(obj_id) returns the name of the object specified by obj_id. If no name is attached to the object, an empty character vector is returned.

Examples

Display the names of all the objects in the /g3 group in the example file by alphabetical order.

idx_type = 'H5_INDEX_NAME';
order = 'H5_ITER_INC';
fid = H5F.open('example.h5');
gid = H5G.open(fid,'/g3');
info = H5G.get_info(gid);
for j = 1:info.nlinks
    obj_id = H5O.open_by_idx(fid,'g3',idx_type,order,j-1,'H5P_DEFAULT');
    name = H5I.get_name(obj_id);
    fprintf('Object %d: ''%s''.\n',j-1,name);
    H5O.close(obj_id);
end
H5G.close(gid);
H5F.close(fid);
Was this topic helpful?