| Contents | Index |
j x+yj x+j*y
As the basic imaginary unit sqrt(-1), j is used to enter complex numbers. You can also use the character i as the imaginary unit. If you want to create a complex number without using i and j, you can use the complex function.
Since j is a function, it can be overridden and used as a variable. However, it is best to avoid using i and j for variable names if you intend to use them in complex arithmetic.
If desired, you can use the character j without a multiplication sign as a suffix in forming a complex numerical constant.
For speed and improved robustness, you can replace complex i and j by 1i. For example, instead of using
a = j;
use
a = 1i;
Z = 2+3j Z = x+j*y Z = r*exp(j*theta)

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |