DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate a new channel equal to the max of each point of 2 channels

Hi all,

In DIAdem,

How to calculate a new channel equal to the max of each point of  2 channels (lenght = 1500)

 

Thank you

 

0 Kudos
Message 1 of 2
(3,452 Views)

Hi Boulive69,

 

If you have DIAdem 10.1 or later you can use the ChnCalculate() expression, otherwise you can use the FormulaCalc() expression.

 

L1 = CNo("[1]/[1]")

L2 = CNo("[1]/[2]")

Call ChnCalculate("Ch(""Max"") = IIF(Ch(L1) > Ch(L2), Ch(L1), Ch(L2))")

Call FormulaCalc("Ch('Max'):= Ch(L1)*(Ch(L1)>=Ch(L2)) + Ch(L2)*(Ch(L1)<Ch(L2))")

 

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 2
(3,432 Views)