| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
[dimname, dimlen] = netcdf.inqDim(ncid,dimid)
[dimname, dimlen] = netcdf.inqDim(ncid,dimid) returns the name, dimname, and length, dimlen, of the dimension specified by dimid. If ndims is the number of dimensions defined for a netCDF file, each dimension has an ID between 0 and ndims-1. For example, the dimension identifier of the first dimension is 0, the second dimension is 1, and so on.
ncid is a netCDF file identifier returned by netcdf.create or netcdf.open.
This function corresponds to the nc_inq_dim 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.
The example opens the example netCDF file include with MATLAB, example.nc.
ncid = netcdf.open('example.nc','NC_NOWRITE');
% Get name and length of first dimension
[dimname, dimlen] = netcdf.inqDim(ncid,0)
dimname =
x
dimlen =
50

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |