| T O P I C R E V I E W |
| abreiti |
Posted - 08/06/2008 : 09:35:48 AM Hello forum,
I'm looking for a max-min-function like the "ave"-function. I've a column that should be separated in five equal araes. Now I need the min and max-value of every arae.
Anyone has an idea?
abreiti
|
| 1 L A T E S T R E P L I E S (Newest First) |
| adamleewiner |
Posted - 08/06/2008 : 7:55:33 PM Hi, I have a way. Assuming that this colume is col(A),and the number of elements in this column is a multiple of 5.
dataset data=col(a); nums=data.getsize();//get the size of the column.Or use 'nums=wks.ncol$(colnum(a)).nrows'(SR1) nsize=nums/5;//area size loop (ii,1,5) {begin=(ii-1)*nsize+1; end=ii*nsize; limit col(a) -b begin -e end; max$(ii)=limit.ymax; min$(ii)=limit.ymin; };//varible max1 to max5 contains the max value of each area from the top down, the same as min1 - min5
P.S. If the number of column elements is not a multiple of 5, you may use functons like int() and mod() to get the last area size.
An USTCer always keep trying. |
|
|