Help with a simple formula

 

Hello everybody,

I need help with a simple formula. I need to subtract the current data minus the previous data and I wrote this but with a wrong result:

 

Buffer6[i]=Buffer4[i]-Buffer4[i-1];

Buffer7[i]=Buffer5[i]-Buffer5[i-1];

 

 

Thank you,

 

without context, you might mean

 Buffer6[i]=Buffer4[i]-Buffer4[i+1];

 

i+1 will give you the previous element (odd, I know).

sn 

 

Thank you so much

 

0 is the current 1 is the previous 2 is two ago. Not odd at all.

If it was increasing index with time it would be Bars-1 current, Bars-2 previous Bars-3 is two ago. That would be odd.

 
T minus 1 day is the day before the shuttle launch.
Reason: