| 
        
          | 
              
                | 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.
 |  |  
 |