Hi all.

Please refer the following octave code.

cdf = netcdf('glo_att.nc','c');
date='23-Feb-2010';
cdf.CREATION_DATE = date;
cdf.history = 'netcdf file created in octave';
cdf('lon') = 4;
cdf('lat') = 2;
cdf{'var'} =  ncchar('lon','lat');
cdf{'var'}.Time = 'Today';
N=5;
cdf{'var'}.['NOTE_',int2str(N)] = 'This is fifth note';
ncclose(cdf)

Here I want to add "NOTE_5" as an atribute to "var" variable. Though I could 
have simply done it with
cdf{'var'}.NOTE_5;
which would work, the thing is N keeps changing.

Can anyone please suggest some way?

Thanks.

Nands

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to