Parent Directory
|
Revision Log
|
Revision Graph
- make this work both with the legacy mexnc stuff (as before) and with the modern matlab native netcdf implementation.
1 | gforget | 1.1 | function [atts]=ncvatts(ncid,varid); |
2 | %input: ncid is a netcdf file id | ||
3 | % varid is a netcdf variable id | ||
4 | %output: atts is the list of its attributes name (in cell) | ||
5 | |||
6 | [varname,xtype,dimids,natts] = netcdf.inqVar(ncid,varid); | ||
7 | |||
8 | for ii=1:natts; | ||
9 | aa=netcdf.inqAttName(ncid,varid,ii-1); | ||
10 | if ii==1; atts={aa}; else; atts=[atts aa]; end; | ||
11 | end; |
ViewVC Help | |
Powered by ViewVC 1.1.22 |