Main Content


Return array of child group IDs



    childGrps = netcdf.inqGrps(ncid) returns all the child group IDs in the file or parent group, specified by ncid.


    collapse all

    This example opens the sample netCDF file and then gets information about the groups it contains.

     ncid ="",'NOWRITE');
     childGroups = netcdf.inqGrps(ncid);

    Input Arguments

    collapse all

    Identifier of a netCDF file, returned by netcdf.create or, or of a netCDF group, returned by netcdf.defGrp, specified as a nonnegative integer scalar.

    Data Types: double

    Output Arguments

    collapse all

    Identifiers of child groups in the specified netCDF file or group, returned as a nonnegative integer array.

    Data Types: double


    • This function corresponds to the nc_inq_grps function in the netCDF library C API.

    Version History

    Introduced in R2010b