help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get removed from mailing list


From: Jim DeVore
Subject: Get removed from mailing list
Date: Fri, 7 May 2010 22:17:14 -0700

How do I remove myself from the octave mailing list?

Sent from my iPod

On May 1, 2010, at 1:06 AM, Alexander Barth <address@hidden> wrote:

On Thu, Apr 29, 2010 at 1:23 PM, xnand <address@hidden> wrote:

Hi everyone.

The following code creates a netcdf file and then isempty checks if it is
empty. But though it is not empty, it shows the file as empty.

latitude = -90:1:90;
longitude = -179:1:180;
[y,x] = meshgrid(pi/180 * latitude,pi/180 * longitude);
temp = cos(2*x) .* cos(y);
nc = netcdf('example.nc','c');
nc('longitude') = 360;
nc('latitude') = 181;
nc{'longitude'} = ncdouble('longitude');
nc{'longitude'}(:) = longitude;
nc{'longitude'}.units = 'degree West';
nc{'latitude'} = ncdouble('latitude');
nc{'latitude'}(:) = latitude;
nc{'latitude'}.units = 'degree North';
nc{'temp'} = ncdouble('longitude','latitude');
nc{'temp'}(:) = temp;
nc{'temp'}.units = 'degree Celsius';
nc{'temp'}.valid_range = [-10 40];
ncclose(nc);

if isempty(nc)
   disp(' ## The file is empty.')
end

Please note, netcdf function is from octcdf package.

isempty is not supposed to work with netcdf file objects. To test is a
file is empty you can use dir:

d = dir('somefile')
if d.bytes == 0

end

Cheers,
Alex

_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

[Prev in Thread] Current Thread [Next in Thread]