Documentation Center

  • Trial Software
  • Product Updates
라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

abs

Absolute value and complex magnitude

Syntax

abs(X)

Description

abs(X) returns an array Y such that each element of Y is the absolute value of the corresponding element of X.

If X is complex, abs(X) returns the complex modulus (magnitude), which is the same as

sqrt(real(X).^2 + imag(X).^2)

Examples

abs(-5)
ans =
     5

abs(3+4i)
ans =
     5

See Also

| |

Was this topic helpful?