1 |
function [atts]=ncvatts(ncid,varid); |
function [atts]=ncatts(ncid,varid); |
2 |
%input: ncid is a netcdf file id |
%input: ncid is a netcdf file id |
3 |
% varid is a netcdf variable id |
% varid is a netcdf variable id |
4 |
%output: atts is the list of its attributes name (in cell) |
%output: atts is the list of its attributes name (in cell) |
9 |
aa=netcdf.inqAttName(ncid,varid,ii-1); |
aa=netcdf.inqAttName(ncid,varid,ii-1); |
10 |
if ii==1; atts={aa}; else; atts=[atts aa]; end; |
if ii==1; atts={aa}; else; atts=[atts aa]; end; |
11 |
end; |
end; |
12 |
|
|
13 |
|
if natts==0; atts=[]; end; |