Contents - Index



Magnitude(X) returns the magnitude (also called modulus or absolute value) of a complex variable X. In complex mode, the ABS function also returns the magnitude.  Representing X as X_r + i*X_i, this function returns sqrt(X_r^2+X_i^2).  


Example:  Y=Magnitude(X)


The above example will set the real part of Y (Y_r) to the magnitude of X and the imaginary part of Y to zero.


Note that the Magnitude function is used to extract the magnitude of a complex number variable or expression.  It cannot be used for assigning the magnitude of a complex number.  For example,  the equation Magnitude(X)=4 will produce an error. 



See also:  Angle, Imag, Real, CIS, Complex Numbers, Mathematical Functions