Forums > Javascript

How to allocate current inlet and previous inlet to different var

July 17, 2013 | 7:19 am

Dear all.

I am completely new to using javascript. But I am intending to find the rate of change or velocity of an inlet stream. So my idea is to find the difference between the current value and the previous value of the inlet. So the pseudocode I think is:

a = inlet;
wait for an interval x ms ;
b = inlet;
outlet = b – a;

Can you help me out with this? What should the script be?

Many thanks to you all.

Jiajun


August 31, 2013 | 7:07 am

my be what you looking for…?

best regards

peet


August 31, 2013 | 7:07 am

maybe what you’re looking for…?

best regards

peet


Viewing 3 posts - 1 through 3 (of 3 total)