FUNCTION REFERENCE
abs
Absolute value or complex magnitude.
Absolute value or complex magnitude.
Syntax
abs(X)Returns the absolute value of each element. For complex input it returns the magnitude as a real array.
Example
abs([-1 2 -3]) % [1 2 3]Differences from MATLAB: Real double or complex 2-D arrays only; logical input is rejected.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.