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.

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

ncid

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

includeParents

Boolean value. If set to true, netcdf.inqDimIDs includes the dimensions of all parent groups.

Default: false

Output Arguments

dimIDs

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.

For copyright information, read the netcdfcopyright.txt and mexnccopyright.txt files.

Was this topic helpful?