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
 find maximum in y columns & their x values

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
j1623 Posted - 04/10/2022 : 02:55:16 AM
Hi,

I have multiple y columns and a x column. How to find maximum in every y columns and their corresponding x values? I want to plot a graph to show the distribution of the maximums. I tried "statistics on columns" to get the maximums but I don't know how to get the corresponding x values. I tried labtalk scripts but I'm not good at it.

Col(A) is the x column and start from Col(B) are y columns:


Thank you very much.
3   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 04/11/2022 : 06:11:14 AM
Hi,

Cell formula can also help in this case.
You can add a new column and in the first row of the new column, type the function below:

==CX1$+CY1$

Then put the mouse at the bottom right of this cell (the mouse will change to a black cross) and drag it to the end of the column.

Please see this section of the page I mentioned above:
https://www.originlab.com/doc/Origin-Help/Using-Formulae-to-Set-Cell-Values#Extending_Formulas_that_Contain_Sheet_References

Regards, Yuki
j1623 Posted - 04/11/2022 : 04:58:06 AM
quote:
Originally posted by yuki_wu

Hi,

You can use cell formula. For example, if you need to find out the x value of the maximum value in column B, you can type the function below inside an empty cell:

=table(col(B),col(A),max(col(B)));

To learn more about cell formula, please see:
https://www.originlab.com/doc/Origin-Help/Using-Formulae-to-Set-Cell-Values

Regards, Yuki




Thank you Yuki.

Sorry I have a question on table(). Can it use to search value across columns?

Column A is x values and columns B-CX are Y values. In column CX and CY I have the column name(B-CX) and the index of their corresponding target vale.

How can I get the corresponding Y value in a column? For example, row 1: B[76], row 2: C[66], row 3: D[76], row 4: E[63], ...



Thank you very much!
yuki_wu Posted - 04/11/2022 : 02:11:33 AM
Hi,

You can use cell formula. For example, if you need to find out the x value of the maximum value in column B, you can type the function below inside an empty cell:

=table(col(B),col(A),max(col(B)));

To learn more about cell formula, please see:
https://www.originlab.com/doc/Origin-Help/Using-Formulae-to-Set-Cell-Values

Regards, Yuki

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