| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
attnum = netcdf.inqAttID(ncid,varid,attname)
attnum = netcdf.inqAttID(ncid,varid,attname) retrieves attnum, the identifier of the attribute specified by the text string attname.
varid specifies the variable the attribute is associated with.
ncid is a netCDF file identifier returned by netcdf.create or netcdf.open.
This function corresponds to the nc_inq_attid 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.
This example opens the netCDF example file included with MATLAB, example.nc.
% Open the netCDF example file.
ncid = netcdf.open('example.nc','NC_NOWRITE');
% Get the identifier of a variable in the file.
varid = netcdf.inqVarID(ncid,'avagadros_number');
% Retrieve the identifier of the attribute associated with the variable.
attid = netcdf.inqAttID(ncid,varid,'description');
netcdf.inqAttnetcdf.inqAttName
![]() | netcdf.inqAtt | netcdf.inqAttName | ![]() |

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