j
Imaginary unit, equivalent to i.
Category: Mathematics > Elementary Math
Syntax
z = j
The imaginary unit, the complex number 0 + 1i.
z = a + b*j
Builds a complex number from real part a and imaginary part b.
Description
j returns exactly the same value as i. The notation comes from electrical engineering, where i is reserved for current. Like i, it can be shadowed by a variable of the same name, whereas the literal 3j is always imaginary.
The display of complex numbers always uses the letter i, even if the value was written with j.
Output arguments
z- Complex scalar of class double.
Example
Impedance of a series circuit
w = 2*pi*60;
Z = 10 + j*w*0.02
abs(Z)
angle(Z)
Output
Z = 10.0000 + 7.5398i
ans = 12.5239
ans = 0.6460