[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
octcdf: defining attribute
From: |
xnand |
Subject: |
octcdf: defining attribute |
Date: |
Sat, 6 Mar 2010 20:45:33 -0800 (PST) |
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
--
View this message in context:
http://old.nabble.com/octcdf%3A-defining-attribute-tp27809113p27809113.html
Sent from the Octave - General mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- octcdf: defining attribute,
xnand <=