10-13-2007 06:17 AM
10-13-2007 09:44 PM
10-15-2007 02:39 AM
Dear Pietro,
Actually you can simply compute it.
Let's do some math together.
Following your picture you can say.
x2=x1+m*dt where dt is 1/sample_rate
0=x1+m*tau where tau si what you are looking for.
It's quite simple to get
m=(x2-x1)/dt Plese note in your example m<0
tau= -x1/m Plese note, since x1>0 and m<0 tau >0 as expected.
You can further simplify it in tau=-dt*(x1/(x2-x1)) in this last equation everything is known.
Best regards.
10-15-2007 08:17 AM
10-15-2007 08:28 AM
10-15-2007 09:08 AM
@pietrovl1 wrote:
But now I want to determine the exact crossing point,ie the point where the sine crosses the axis of time.
Well, linear interpolation will not give you any "exact" crossing point (your words!), especially if you have limited samples per period, because a sine is NOT a straight line. 😉 If you only have a single frequency in your data, you could just try to determine the phase of it, e.g. with a Fourier transform. This will give you all zero crossings at once with a little math. ;).
Can you attach a small sample VI containing typical data?