| Contents | Index |
parentGroupID = netcdf.inqGrpParent(ncid)
parentGroupID = netcdf.inqGrpParent(ncid) returns the ID of the parent group given the location of the child group, specified by ncid.
ncid |
Identifier of a NetCDF file, returned by netcdf.create or netcdf.open, or of a NetCDF group, returned by netcdf.defGrp. |
parentGroupID |
Identifier of the NetCDF group or file that is the parent of the specified file or group. |
This example opens the NetCDF sample file and gets the full path of the parent of the specified group.
ncid = netcdf.open('example.nc','NOWRITE');
gid = netcdf.inqNcid(ncid,'grid2');
parentId = netcdf.inqGrpParent(gid);
fullName = netcdf.inqGrpNameFull(parentId);
netcdf.close(ncid);This function corresponds to the nc_inq_grp_parent function in the NetCDF library C API.
For copyright information, read the netcdfcopyright.txt and mexnccopyright.txt files.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |