netcdf.inqDimID - Return dimension ID
Syntax
dimid = netcdf.inqDimID(ncid,dimname)
Description
dimid = netcdf.inqDimID(ncid,dimname) returns dimid,
the identifier of the dimension specified by the character string dimname.
You can use the netcdf.inqDim function to retrieve
the dimension name. ncid is a netCDF file identifier
returned by netcdf.create or netcdf.open.
This function corresponds to the nc_inq_dimid function
in the netCDF library C API. To use this function, you should be familiar
with the information about netCDF contained in the NetCDF
C Interface Guide for version 3.6.2.
Examples
This example opens the example netCDF file included with MATLAB, example.nc.
% Open netCDF example file.
ncid = netcdf.open('example.nc','NC_NOWRITE');
% Get name and length of first dimension
[dimname, dimlen] = netcdf.inqDim(ncid,0);
% Retrieve identifier of dimension.
dimid = netcdf.inqDimID(ncid,dimname)
dimid =
0
See Also
netcdf.inqDim
 | netcdf.inqDim | | netcdf.inqLibVers |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit