typestar

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

  1. Smooth takes a window; /B asks for a boxcar instead of binomial.
  2. Differentiate and Integrate respect the wave's x scaling.
  3. Work on a duplicate unless you mean to lose the original.

Keywords and builtins used here

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.

Type this snippet

Step 1 of 4 in Signals & matrices, step 11 of 16 in Waves & analysis.

← Previous Next →