[Thread Prev][Thread Next][Index]

Sampling



Hi,

I am having problems trying to sample a region in the xy plane.
I am following section 33.2 of the documentation of version 4.4.
My problem is in defining xpts and ypts.

I defined 

let/quiet xpts = if i[i=1:20] LE 10 then 300+5*(i[i=1:20]-1)/3 else
305+5*(i[i=1:20]-11)/3

and it works. But I need to put more conditions in the "if" control. For
example, I tried 

let xpts = IF i[i=1:30] LE 10 then 300+5*(i[i=1:30]-1)/3 ELIF i[i=1:30]
GE 11 and LE 20 305+5*(i[i=1:30]-11)/3 ELSE 310+5*(i[i=1:30]-11)/3
 
but it does not work. 

I tried also
 
if `i LE 10` then
 let xpts = 300+5*(i-1)/3
elif `i GE 11` and `i le 20` then
 let xpts = 305+5*(i-11)/3 
else
 let xpts = 310+5*(i-21)/3
endif

but it did not work either. Does the conditional "AND" exist in ferret?
Is there any way to define the variable xpts with many conditions as
above??? 

Any help is appreciated!

Marcelo Barreiro
Dept. of Oceanography
Texas A&M University




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement