typestar

Making a wave in Igor Pro

A wave is the thing Igor is built around: a named, numbered array that knows its own axis.

Make/O/N=100/D wave0
wave0 = sin(2 * pi * p / 100)

Make/O/N=(50, 3)/D grid2d
grid2d = p * q

Make/O/T/N=3 labels
labels = {"alpha", "beta", "gamma"}

How it works

  1. Make creates a wave; /N is its length and /O overwrites one that exists.
  2. /D asks for double precision, which is what numeric work wants.
  3. A wave assignment runs over every point at once — no loop needed.

Keywords and builtins used here

The run, in numbers

Lines
8
Characters to type
149
Tokens
51
Three-star pace
70 tpm

At the three-star pace of 70 tokens a minute, this run takes about 44 seconds.

Type this snippet

Step 1 of 4 in Waves, step 1 of 18 in Language basics.

Next →