Arithmetic Functions

Here are the six essential arithmetic operators and their function equivalents. You can add numbers, matrices, and variables that contain either. Each operator has two forms: an operator (for example, `+`) and a functional equivalent (for example, `Add()`).

Add(a, b, ...)

a+b+...

Description

Adds the values of the listed arguments. No arguments are changed.

Returns

The sum.

Arguments

For `Add()`, a comma-separated list of variables, numbers, or matrices.

For `a+b`, any number of variables, numbers, or matrices.

Notes

Any number of arguments is permitted. If no argument is specified, `Add()` returns 0.

See Also

The Data Structures chapter in the `Scripting Guide`.

Divide(a, b)

Divide(x)

a/b

Description

Divides `a` by `b`. If only one argument ...

Start Free Trial

No credit card required