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 for Programming
 LabTalk Forum
 Corresponding 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
wokywoky Posted - 02/22/2015 : 1:10:26 PM
Hi, I was wonder how can I know the corresponding value of a certain value. For example, if I have two columns X and Y how can I know the value in X of the maximum Y value?

Thanks in advanced

GG
3   L A T E S T    R E P L I E S    (Newest First)
Mike Posted - 02/24/2015 : 09:11:13 AM
GG, here is another solution to your problem:

table(col(Y), col(X), max(col(Y)))=

For information on LabTalk supported functions, see this page:
http://originlab.com/doc/LabTalk/guide/LT-Supported-Functions

Mike Genthner
OriginLab Tech Support
wokywoky Posted - 02/23/2015 : 04:05:13 AM
Thank you for the code and the information : )

GG
cpyang Posted - 02/22/2015 : 3:52:16 PM
It all depends on which values. In your specific example, lets assume that you have X in col(A) and Y in column(B), then the following is how you find X at Max Y:

sum(col(B));
col(A)[sum.imax]=;



You can see more about the LabTalk SUM function here:

http://www.originlab.com/doc/LabTalk/ref/Sum-obj


CP

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