|
mag |
(function for equations) |
|
Usage: |
mag (x1, x2, ... xn) |
|
Definition: |
sqrt (x1^2 + x2^2 + ... + xn^2) |
|
Required: |
xi are unrestricted reals |
Returns the magnitude of the vector [x1, x2, … xn].
This is also known as the Euclidean length of the vector.
If the real and imaginary part of a complex number are passed, the magnitude of the complex number is returned.
If no arguments are passed, zero is returned. If one argument is passed, its absolute value is returned.
|
Example: |
mag (1.5, 0, -2) returns 2.5 |