abs(z) returns the absolute value (or complex
modulus) of z. Because symbolic variables are assumed to
be complex by default, abs returns the complex modulus (magnitude) by
default. If z is an array, abs acts element-wise
on each element of z.
The absolute value of a complex number z = x + y*i is the value . Here, x and y are real numbers. The
absolute value of a complex number is also called a complex modulus.
Tips
Calling abs for a number that is not a symbolic object invokes the
MATLAB®abs function.