Smoothing and derivatives in Igor Pro
The everyday signal operations, all of which write in place unless told otherwise.
Function/WAVE Velocity(WAVE position)
Duplicate/O position, smoothed
Smooth/B 11, smoothed
Duplicate/O smoothed, velocity
Differentiate velocity
Duplicate/O velocity, distance
Integrate distance
return velocity
End
How it works
Smoothtakes a window;/Basks for a boxcar instead of binomial.DifferentiateandIntegraterespect the wave's x scaling.- Work on a duplicate unless you mean to lose the original.
Keywords and builtins used here
DifferentiateDuplicateEndFunctionIntegrateSmoothWAVEreturn
The run, in numbers
- Lines
- 12
- Characters to type
- 217
- Tokens
- 34
- Three-star pace
- 85 tpm
At the three-star pace of 85 tokens a minute, this run takes about 24 seconds.
Step 1 of 4 in Signals & matrices, step 11 of 16 in Waves & analysis.