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
 Origin Forum
 Maximum for multiple datasets

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
Wellsyfred Posted - 10/03/2014 : 12:48:29 AM
Hi,

I have multiple large datasets and am trying to programmatically find the maximum of each.

For example, if I had the data:

X Y1 Y2 Y3
1 2 7 3
2 43 65 23
3 44 34 60


I would want it to return 44, 65, 60

Additionally, I would like to find the X values corresponding to these maximum values. For my example these would be 3, 2, 3.

I have tried using max(Col(A1)) and inserting each column manually, which works fine, but would be painstaking to type out for hundreds of columns...

Origin Ver. 8.6, Windows 7


Thanks so much!
2   L A T E S T    R E P L I E S    (Newest First)
Wellsyfred Posted - 10/04/2014 : 01:31:10 AM
This worked perfectly!

Thanks so much :)
greg Posted - 10/03/2014 : 09:13:44 AM
Right-click on the Title Bar of your Workbook and choose "Show Script Panel".
In the lower panel, paste the following script:
// BEGIN SCRIPT
wks.userparam1$ = Max;
wks.userparam1 = 1;
wks.userparam2$ = at X;
wks.userparam2 = 1;
loop(ii,2,wks.ncols)
{
limit wcol(ii);
wcol(ii)[Max]$ = $(limit.ymax,*5);
wcol(ii)[at X]$ = $(limit.imax);
}
// END SCRIPT
Click the Execute button.

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