DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Summation of two channels or more

Hello, 

 


What is the way to do the Summation of 2 channels or 4 channels?

 

My formula is 

 

 

Channel1

channel2

channel3

channel4

 

TD= (SUMation (Ch1 and Ch2)) / (Sumation (Ch1 and Ch2 and Ch3 and Ch4))

 

 

Thanks!!!

 

 

Sara 

0 Kudos
Message 1 of 3
(3,862 Views)

Hi Sara,

 

Do you want to add arrays element by element:

 

ArrayOne(1) + ArrayTwo(1)

ArrayOne(2) + ArrayTwo(2)

       :                     :

ArrayOne(N) + ArrayTwo(N)

 

Or do you want to sum all the elements of one array and then add that to the sum of all the elements of the other array?

 

In both cases you can do this in the ANALYSIS panel of DIAdem.  For the first case above you can use the Basic Mathematics palette of ANALYSIS functions (Add, Divide).  For the second case above you'll need to use the Statistics palette of ANALYSIS functions to calculate the sum of each channel.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

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

Hi Sara,

 

    You can use the following expression:

Call Calculate("Ch(""[1]/prueba"")=Ch(""[1]/Speed"")+Ch(""[1]/Torque"")+Ch(""[1]/Revs"")",NULL,NULL,"")

 

    I've used the Example data which is loaded in Data Portal by default when launching DIAdem.

 

    Regards,

David Oña
0 Kudos
Message 3 of 3
(3,821 Views)