help-octave
[Top][All Lists]
Advanced

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

Re: octcdf


From: David Bateman
Subject: Re: octcdf
Date: Mon, 01 Sep 2008 17:31:06 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080725)

Andres Sepulveda wrote:
  Hi,

  I have a code which searchs for a specific dimension inside a NetCDF file.

nc=netcdf(fname,'write');
tlen =  length(nc('tclm_time'));
tlen
if tlen==0
  tlen=1;
end

but is the file doesn't has that field it stops with the following error

error: Error while querying dimension tclm_time: NetCDF: Invalid
dimension ID or name
error: evaluating argument list element number 1

is there a way the variable tlen would just become 0, rather than to
give that error message?

 Regards,

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


nc=netcdf(fname,'write');
try
 tlen = length (nc('tclm_time'));
catch
 tlen = 0;
end
if tlen== 0
 ten =1;
end

--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary



reply via email to

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