絕對值與複數值
Syntax
Y = abs(X)
Description
abs(X) 回傳 X 中各元素的絕對值 。
abs(X)
X
若 X 為複數, abs(X) 回傳複數值(complex magnitude):
abs(X) = sqrt(real(X).^2 + imag(X).^2)
Examples
abs(-5) = 5 abs(3+4i) = 5
See Also
angle, sign, unwrap
angle
sign
unwrap