Complex number

A complex number has a real part and an imaginary part, and the imaginary unit is the square root of -1.

sqrt(-1)

ans = 0.0000 + 1.0000i

To represent the imaginary part of a complex number, use i or j.

c = [3+4i, 4+3j; -i, 10j]

c = 2×2 complex
   3.0000 + 4.0000i   4.0000 + 3.0000i
   0.0000 - 1.0000i   0.0000 +10.0000i
Comments