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 [vars]=ncvars(ncid); |
2 | %input: ncid is a netcdf file id | ||
3 | %output: vars is the list of its variables name (in cell) | ||
4 | |||
5 | [numdims, numvars, numglobalatts, unlimdimID] = netcdf.inq(ncid); | ||
6 | for ii=1:numvars; | ||
7 | aa=netcdf.inqVar(ncid,ii-1); | ||
8 | if ii==1; vars={aa}; else; vars=[vars aa]; end; | ||
9 | end; |
ViewVC Help | |
Powered by ViewVC 1.1.22 |