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
 Set Column Values if-function

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
Chrissab Posted - 09/16/2013 : 09:27:56 AM
Hi,

I want to do a simple test with an if-function (to binarize a signal).
Col(A): (signal Y, sampling intervall dx=0,001)
Col(B): (values Y, sampling intervall dx=1)

If the value in Col(A) is smaller than the value of the matching sampling intervall in Col(B)--> 1, else --> 0.

How can I realize that in a very simple way, maybe with "set column values" I've never worked with LabTalk yet. (I have OriginPro)

Thanks for each help!

1   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 09/16/2013 : 12:18:38 PM
Hello,

Origin supports conditional operator. The syntax is
Expression1 ? Expression2 : expression3
If expression 1 is true, then run expression2. If false, then use expression 3.

E.g. if you have col(A) and col(B) with values, add a new column C.
Set column C's values to be
Col(A)<col(B)? 1 : 0


I am not sure what you mean by "If the value in Col(A) is smaller than the value of the matching sampling intervall in Col(B)", but u can see the example above to get an idea.

Thanks, Snow Li
OriginLab Corp.

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