Contents - Index


$Complex ON/OFF  i/j

 

EES provides an option in the Complex tab of the Preferences dialog to enable or disable complex algebra.  This directive provides a means of setting the option for complex numbers in the Equations Window.  The directive also optionally allows whether i or j is to be used to represent the square root of -1.  To allow complex algebra with j as the square root of -1, enter

 

$Complex On j

 

To disable it, enter

 

$Complex Off

 

The $Complex On directive can be used in Subprograms.  It is possible to have the main program operate without complex numbers and call a Subprogram that does the complex calculations.  Note that he real and imaginary parts of a complex number must be passed to the Subprogram separately.  The real part is identified with _r at the end of the variable name.  The imaginary part has a _i at the end of its variable name.  

 

Modules and functions cannot be used in a program that uses complex calculations. 

 

Directives