netcdf.inqAtt
Work with netCDF attributes.
📝Syntax
[xtype, len] = netcdf.inqAtt(ncid, varid, attname)
📥Input Arguments
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.
📤Output Arguments
Parameter Description
[xtype, len] Return value described by the syntax shown above.
📄Description

netcdf.inqAtt exposes low-level attribute operations.

Attributes store metadata such as units, titles, comments, scale factors, and valid ranges.

💡Examples
Copy-paste example for netcdf.inqAtt.
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);
🔗See Also
netcdf.putVarnetcdf.getConstant
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub