val =
ncreadatt(filename,varname,attname) ¶Return the attribute attname of the variable varname in the file filename.
Global attributes can be accessed by using "/" or the group name as
varname. The type of attribute is mapped to the Octave data types.
(see ncinfo
).
Read global attribute ’creation_date’
d = ncreadatt('test.nc','/','creation_date')
Read atribute ’myattr’ assigned to variable mydata.
d = ncreadattr('test.nc', 'mydata', 'myattr');
See also: ncinfo,ncwriteatt.
Package: netcdf