The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Statistics: Max and Min

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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.

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000