Defines a macro.
#DEFINE name(arg1, arg2, ..., argN) formula
name |
- |
A string up to 15 characters, the name of the macro. |
argN |
- |
Optional. Zero or more arguments to pass to the macro expression. |
formula |
- |
The macro expansion incorporating those arguments and evaluating to a real, string, series, or table. |
#define autocor(s) conv(s, reverse(s))/(2*sersize(s))
defines a macro which performs an auto-correlation of a series.
W1: gsin(128, 1/128, 4.0)
autocor(W1)
calculates the auto-correlation of the sine wave.
#DEFINE can redefine existing macros.
Macros are defined and saved with the Worksheet. Use MACWRITE to write macros to a file.
See DEFMACRO to dynamically define a macro within an SPL routine.
The maximum length of a macro name is 63 characters.