Returns the real part of a number or matrix.
Syntax |
Description |
---|---|
out = real(x); |
Returns the real part of x. |
Example
Calculate the real part of numbers in an array.
?x=linspace(0, 2+1i,2); result: 0+0i 2+1i ?real(x); result: 0 2
See Also