Matlab基本函数-imag函数

时间:2020-11-30 21:31:55

1、imag函数:求复数的虚部部分

2、用法说明

      Y=imag(X) 函数计算复数X的虚数部分Y。输出结果Y与输入X的维数相同,返回值为复数数组X中的每个复数的虚部

3、举例说明

>> x = [1.2+2.3i 4+5.3i 34-123.456i 78-123456.78967i]

x =

   1.0e+05 *

   0.0000 + 0.0000i   0.0000 + 0.0001i   0.0003 - 0.0012i   0.0008 - 1.2346i

>> y = imag(x)

y =

   1.0e+05 *

    0.0000    0.0001   -0.0012   -1.2346
4、附录

>> help imag
 imag   Complex imaginary part.
    imag(X) is the imaginary part of X.
    See I or J to enter complex numbers.
 
    See also real, isreal, conj, angle, abs.

    Overloaded methods:
       codistributed/imag
       gpuArray/imag
       iddata/imag

    Reference page in Help browser
       doc imag