Have a look again at the answers to your previous questions: http://www.mail-archive.com/octave-dev@lists.sourceforge.net/msg03460.html
you get the name and values (as in ncdump) of an attribute then you define it as described in the previous thread. Alex On Tue, May 4, 2010 at 6:19 AM, <n...@itimes.com> wrote: > Hi Alex. > > From ncdump.m, I learnt how to get the attributes, but I don't know how to > copy them to another variable. > Could you please show that with an example. > > Thanks, > Nands > > > > ----- Original Message ----- > From: Alexander Barth <barth.alexan...@gmail.com> > To: n...@itimes.com > Cc: octave-dev <octave-dev@lists.sourceforge.net> > Sent: Sat, 1 May 2010 13:24:43 +0530 (IST) > Subject: Re: [OctDev] copying attributes in octcdf > > On Thu, Apr 22, 2010 at 1:36 PM, <n...@itimes.com> wrote: >> Hi all. >> >> Is there any way to copy attributes from one netcdf file to another netcdf >> file? >> >> Thanks, >> Nands > > you can use ncatt to get a cell array of all attributes of a > variable/file and then copy the attributes one by one. The code of > ncdump.m might be instructive. > > Cheers, > Alex > ------------------------------------------------------------------------------ _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev