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
 How to find the biggest value in a column?

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
Selinger78 Posted - 08/25/2004 : 08:36:42 AM
Hello!
I am using Origin 6.0 and as an origin beginner I am not very familiar with all the functions. I have a relativly simple task, I need to fill an empty column with the highest value of an existing column. So I open the dialoge box "set column values" but then I don't find a function to display the maximum value of a certain column!
Can anybody helb me?
Best regards,
Selinger 78
4   L A T E S T    R E P L I E S    (Newest First)
Selinger78 Posted - 08/26/2004 : 05:10:31 AM
Thanks!
Now it works!

Mike Buess Posted - 08/25/2004 : 10:16:00 AM
A command or series of commands typed in the script window is executed automatically when you press Enter. Copy the four command lines from my previous post to your script window, select (highlight) all four lines and then press Enter.

You can do this partially with the Set Column Values dialog after all. Start by finding the maximum value from the script window...

sum(col(B))<Press Enter>

Now open Set Column Values dialog and enter the expression sum.max for the Col(Max) value.

...There is an easier way to do this if Origin 6.0 has a Normalize command on the context menu for columns. (I don't remember whether or not it does.)

1. Right-click on the column from which you want to obtain the max value and select Normalize (if it exists) on the resulting menu.

2. The default value offered in the Normalize dialog is the max value. Copy (Ctrl+C) that value to clipboard. Then press Cancel to close the dialog.

3. Open the Set Column Values dialog for the column in which you want to put the max value. Paste (Ctrl+V) the value from the clipboard into the expression box.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 08/25/2004 10:57:29 AM
Selinger78 Posted - 08/25/2004 : 09:38:08 AM
Thanks for the fast answer!
However, I somehow cannot execute such a script, when I type "run" I get an error message that says "the initial configuration script file is missing or not in the directory".
How do I have to continue in such a case?
Best regards,
selinger78

Mike Buess Posted - 08/25/2004 : 08:58:46 AM
Probably easiest to use LabTalk's sum() function. Say you want to find the largest value in col B and set all rows in a new col named Max to that value...

wo -v Max; // create col Max if it doesn't already exist
col(Max)=col(B); // give it some initial values
sum(col(B)); // find sum.max, sum.min, sum.total, etc
col(Max)=sum.max; // set all rows in col Max to maximum value col B

...You'll need to run those commands from the script window rather than the Set Column Values dialog.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 08/25/2004 09:02:52 AM

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