| Contents | Index |
attvalue = ncreadatt(source,location,attname)
attvalue = ncreadatt(source,location,attname) reads the attribute attname from the group or variable specified by location in source, where source is the name of a NetCDF file or the URL of a NetCDF data source.
attvalue |
Data associated with the attribute. |
Read a global attribute.
creation_date = ncreadatt('example.nc','/','creation_date');
disp(creation_date);
Read an attribute associated with a variable.
scale_factor = ncreadatt('example.nc','temperature','scale_factor');
disp(scale_factor);Read an attribute associated with a group (netcdf4 format files only).
desc_value = ncreadatt('example.nc','/grid2','description');
disp(desc_value);ncdisp | ncinfo | ncread | ncwriteatt | netcdf

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |