Free waves in Igor Pro
A free wave has no name in the experiment and disappears when nothing refers to it.
Function/WAVE Normalized(WAVE src)
Duplicate/FREE src, out
WaveStats/Q out
if (V_max == V_min)
out = 0
return out
endif
out = (out - V_min) / (V_max - V_min)
return out
End
How it works
/FREEmakes one; it belongs to the function, not to a data folder.- It is how a helper returns a wave without leaving litter behind.
Duplicate/FREEtakes a scratch copy for the same reason.
Keywords and builtins used here
DuplicateEndFunctionWAVEWaveStatsendififreturn
The run, in numbers
- Lines
- 12
- Characters to type
- 174
- Tokens
- 43
- Three-star pace
- 80 tpm
At the three-star pace of 80 tokens a minute, this run takes about 32 seconds.
Step 3 of 4 in Wave assignment, step 3 of 16 in Waves & analysis.