[xtype, len] = netcdf.inqAtt(ncid, varid, attname)
| Parameter | Description |
|---|---|
| ncid | Open netCDF file or group identifier. |
| varid | Variable identifier, or NC_GLOBAL for a global attribute. |
| attname | Attribute name. |
| attvalue | Attribute value. |
| Parameter | Description |
|---|---|
| [xtype, len] | Return value described by the syntax shown above. |
netcdf.inqAtt exposes low-level attribute operations.
Attributes store metadata such as units, titles, comments, scale factors, and valid ranges.
filename = [tempdir(), 'help_netcdf_inqAtt.nc'];
ncid = netcdf.create(filename, netcdf.getConstant('NC_CLOBBER'));
netcdf.putAtt(ncid, netcdf.getConstant('NC_GLOBAL'), 'title', 'sample file');
[xtype, len] = netcdf.inqAtt(ncid, netcdf.getConstant('NC_GLOBAL'), 'title');
netcdf.close(ncid);
| Version | Description |
|---|---|
| 2.0.0 | initial version |