[Thread Prev][Thread Next][Index]

Re: [ferret_users] [ferret] compress, expand variable



Hi Patrick,
there are also the family of functions compress*_by will do this, but expressing the mask is a bit different:

yes? show function compressi_by
COMPRESSI_BY(dat,mask)
Compress arg1 by (multi-D) mask in arg 2
dat: variable to compress on I axis
mask: valid/bad points guiding compression (multi-D)

yes? let a = {101,202,303,404,505,606,707,808,909}
yes? let b = {,,1,,,1,1,,1}
yes? list compressi_by(a,b)
VARIABLE : COMPRESSI_BY(A,B)
SUBSET : 9 points (X)
1 / 1: 303.0
2 / 2: 606.0
3 / 3: 707.0
4 / 4: 909.0
5 / 5: ....
6 / 6: ....
7 / 7: ....
8 / 8: ....
9 / 9: ....



Patrick Brockmann wrote:

Hi all,

Is there a way to compress a variable from
a selection of index ?

Here is an example of what I am looking for:
let A={101,202,303,404,505,606,707,808,909}
let B={3,6,7,9}

Now, I would like to get a new variable C to work on A from the selected indexes B.
This new variable C will be equal to :
303,606,707,909

Thanks for any idea on this topic
Patrick


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement