EN
 
English
Italian
French
German

Math - Reference Previous Value

Antonio Exley

Posted on 12.07.2018 15:17

Hello,


I feel like I am missing something. Is there a way to create a formula in Dewesoft that can use a previous value for a reference? For example:

X = 1 + (current value / previous value)

Urban Baš
Software Test Engineer I
Posted on 13.07.2018 05:45

Hi,

yes, there is. In you example the math formula would be:

X=1+(y/y.data(-1))

This formula will divide the current signal value with the value this signal had one sample earlier.


Attached files:
Antonio Exley

Posted on 13.07.2018 22:18

@Urban Baš

Perfect! Thank you! I was using the .data incorrectly.


Login to reply to this topic. If you don't have account yet, you can signup for free account .
This website uses cookies to ensure you get the best experience on our website. Learn more