Main Content

netcdf.inqGrpName

Return name of group

    Description

    groupName = netcdf.inqGrpName(ncid) returns the name of a group specified by ncid.

    Note

    This function corresponds to the nc_inq_grpname function in the netCDF library C API.

    example

    Examples

    collapse all

    This example opens the NetCDF sample file and gets the names of groups in the dataset.

     ncid = netcdf.open("example.nc",'NOWRITE');
     name = netcdf.inqGrpName(ncid);
     netcdf.close(ncid);
    

    Input Arguments

    collapse all

    Identifier of NetCDF file, returned by netcdf.create function or netcdf.open function, or of a NetCDF group, returned by netcdf.defGrp function.

    Data Types: double

    Output Arguments

    collapse all

    The name of the group specified by ncid, returned as a character vector. The root group has the name '/'.

    Data Types: char

    Version History

    Introduced in R2010b