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 and Table for large amount of data

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
luckyluc22 Posted - 07/01/2021 : 10:48:32 AM
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2019 (64-bit)
9.6.0.172 (Academic)
Operating System: Windows 10

Hi,
I have a workbook with 928 worksheets, each containing 2 columns (A(X) and B(Y)). In a new worksheet, I want one column with with the maximum Y-value of sheets 1 through 928 (so 928 rows with =max(1!B) through =max(928!B)). In a second column, I want the corresponding X-values of those maximum Y-values (so =table(1!B, 1!A, max(1!B)) through =table(928!B, 928!A, max(928!B)). I don't know how to do this without having to retype the worksheet numbers 928 times. Can somebody help me with this?
Thanks in advance,
Luc
2   L A T E S T    R E P L I E S    (Newest First)
luckyluc22 Posted - 07/02/2021 : 06:21:58 AM
quote:
Originally posted by YimingChen

Try the Labtalk script below:

Dataset dsx, dsy;
dsx.SetSize(page.nlayers);
dsy.SetSize(page.nlayers);
int i = 1;

doc -e LW {
	range rx = 1;
	range ry = 2;
	double max = max(ry);
	dsy[i] = max;
	dsx[i] = table(ry, rx, max);
	i = i + 1;
}

newbook;
col(A) = dsx;
col(B) = dsy;


James



Thank you! This worked perfectly.
Luc
YimingChen Posted - 07/01/2021 : 12:35:27 PM
Try the Labtalk script below:

Dataset dsx, dsy;
dsx.SetSize(page.nlayers);
dsy.SetSize(page.nlayers);
int i = 1;

doc -e LW {
	range rx = 1;
	range ry = 2;
	double max = max(ry);
	dsy[i] = max;
	dsx[i] = table(ry, rx, max);
	i = i + 1;
}

newbook;
col(A) = dsx;
col(B) = dsy;


James

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