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.inqVarIDs

IDs of all variables in group

Syntax

varids = netcdf.inqVarIDs(ncid)

Description

varids = netcdf.inqVarIDs(ncid) returns IDs of the all the variables in the group specified by ncid.

Input Arguments

ncid

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

Output Arguments

varids

Array containing identifiers of variables in a NetCDF file or group.

Examples

This example opens the NetCDF sample file and gets the IDs of all the variables in a group.

 ncid = netcdf.open('example.nc','NOWRITE');
 gid = netcdf.inqNcid(ncid,'grid1');
 varids = netcdf.inqVarIDs(gid);
 netcdf.close(ncid);

References

This function corresponds to the nc_inq_varids function in the NetCDF library C API.

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

Was this topic helpful?