[Thread Prev][Thread Next][Index]

Sampling



Hi ferreters,

I posted several days ago a prolem about sampling. Here is the solution
suggested by Mark Verschell.

Following section 33.2 of the documentation of version 4.4 in order to
sample a region in the xy plane you have to define xpts and ypts.

If you have only one condition you can define xpts as (ypts is analog)

let/quiet xpts = if i[i=1:22] LE 11 then 303+2.5*(i[i=1:22]-1) else
303+2+2.5*(i[i=1:22]-12)

and it works. 

But the problem I had before was to put more conditions in the
"if" control sentence. This is solved by

let xpts1 = IF <cond1> then <A> ELSE <B>
let xpts2 = IF <cond2> then xpts1 ELSE <C>
let xpts = IF <cond3> then xpts2 ELSE <D>

Here is an example which creates xpts following this rule

let xpts1 = IF i[i=1:44] LE 11 then 303+2.5*(i[i=1:44]-1) ELSE 
303+2+2.5*(i[i=1:44]-12)
let xpts2 = IF i[i=1:44] LE 22 THEN xpts1 ELSE 303+2*2+2.5*(i[i=1:44]-23)
let xpts = IF i[i=1:44] LE 33 THEN xpts2 ELSE 303+3*2+2.5*(i[i=1:44]-34)

Hope this is useful!

Marcelo Barreiro









[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement