DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

how to nest integrate function in chncalculate

Solved!
Go to solution

This is what i want to do

 

VDV.JPG

 

i am using following formula where aw(t) is stored in [1]/FrequenceEvaluation channel

 

 

Call ChnCalculate((ChnIntegrate("Ch(""[1]/Time""),Ch(""[1]/FrequencyEvaluation"")^4,Ch(""[1]/VDV"")"))^0.25)

0 Kudos
Message 1 of 5
(4,348 Views)
Solution
Accepted by topic author GDU

Hello GDU!

 

I would recommend to split you calculation into parts. This will reduce the risk of some errors you made.

 

Calculation steps:

  1. Use ChnCalculate to generate a aw(t)^4 channel
  2. Use ChnIntegrate on this channel
  3. Calculate result^1/4

In general it is not possible to use channel calculation functions in an ChnCalculate expression. The reason is that ChnCalculate evaluates its expression on every value in a channel one by one. In opposit all channel calculate functions will process the whole channel and writes the result in a new one.

 

Matthias

 

 

 

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
Message 2 of 5
(4,344 Views)

thats wat i thought of doing earlier but its creating 2 extra channels. I have to do this calculation on 9 such channels. I thought there might be some way of nesting integral function in chncalculate.

 

 

0 Kudos
Message 3 of 5
(4,342 Views)

Hello GDU!

 

You don't need any additional channel if you save the ChnIntegrate result in the input channel (option, see help) and use the last value of this channel for the scalar calculation.

 

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
Message 4 of 5
(4,334 Views)

Hi Twigeater

 

I got that but i need that channel for other calculations too. Right now i am managing with ChnDelete command after creation of intermediate channels.

 

Thanks

 

 

0 Kudos
Message 5 of 5
(4,300 Views)