From: mb on
I want to save some varialbes from the workspace into a netCDF-fil. Can I do this in the m-file, or do I have to do it from the command window?

I manage to save varaibles in the workspace into a .mat fil from the command window, but when I try the .nc file-format it does not work.

I use the syntax
save filename variable1 variable2 -NC

Anyone who know what I'm doing wrong?
From: us on
"mb " <marit.berger(a)student.lu.se> wrote in message <hrbhmr$9lc$1(a)fred.mathworks.com>...
> I want to save some varialbes from the workspace into a netCDF-fil. Can I do this in the m-file, or do I have to do it from the command window?
>
> I manage to save varaibles in the workspace into a .mat fil from the command window, but when I try the .nc file-format it does not work.
>
> I use the syntax
> save filename variable1 variable2 -NC
>
> Anyone who know what I'm doing wrong?

SAVE does not know the -nc option...
you must directly work with the NETCDF package...
see

doc netcdf;

for instructions...

us