help-octave
[Top][All Lists]
Advanced

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

Re: Get removed from mailing list


From: David Bateman
Subject: Re: Get removed from mailing list
Date: Sat, 08 May 2010 09:19:44 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Jim DeVore wrote:
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
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Every mail sent to this list has this

List-Id: <help-octave.octave.org>
List-Unsubscribe: <https://www-old.cae.wisc.edu/mailman/listinfo/help-octave>, <mailto:address@hidden>
List-Archive: <https://www-old.cae.wisc.edu/pipermail/help-octave>
List-Post: <mailto:address@hidden>
List-Help: <mailto:address@hidden>
List-Subscribe: <https://www-old.cae.wisc.edu/mailman/listinfo/help-octave>,
        <mailto:address@hidden>

in its header... So you probably should have needed to ask this question

D.



reply via email to

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