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.
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.