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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 find maximum in y columns & their x values
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

j1623

4 Posts

Posted - 04/10/2022 :  02:55:16 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

yuki_wu

896 Posts

Posted - 04/11/2022 :  02:11:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

j1623

4 Posts

Posted - 04/11/2022 :  04:58:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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!
Go to Top of Page

yuki_wu

896 Posts

Posted - 04/11/2022 :  06:11:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000