netcdf.inqDimIDs
Retrieve list of dimension identifiers in group
Syntax
dimIDs = netcdf.inqDimIDs(ncid)
dimIDs = netcdf.inqDimIDs(ncid,includeParents)
Description
dimIDs = netcdf.inqDimIDs(ncid)
returns
a list of dimension identifiers in the group specified by ncid
.
dimIDs = netcdf.inqDimIDs(ncid,includeParents)
includes
all dimensions in all parent groups if includeParents
is true
.
Input Arguments
|
Identifier of a NetCDF file, returned by |
|
Boolean value. If set to Default: |
Output Arguments
|
Array of dimension IDs |
Examples
This example opens the NetCDF sample file and gets the IDs of all the dimensions.
ncid = netcdf.open('example.nc','NOWRITE'); gid = netcdf.inqNcid(ncid,'grid1'); dimids = netcdf.inqDimIDs(gid); dimids_all = netcdf.inqDimIDS(gid, true); netcdf.close(ncid);
References
This function corresponds to the nc_inq_dimids
function
in the NetCDF library C API.