Complex
 

| HOME | BACK |

Overview

Complex class is used for an imaginary number, which consists of a real part and imaginary part.

Member data

Name Data type Meaning
real double a double precision number for the real part
img double a double precision number for the imaginary part

 

Operator

See details in operator section.

 

Construction function

{Complex} ret  =  COMPLEX([{double} argm1, {double} argm2])

argm1 = a number of real part       (default = 0)

argm2 = a number of imaginary part  (default = 0)

Example:

->A = Complex()

->print A

ans =    0.000 + 0.000i

->B = Complex(2,3)

->print B

ans =    2.000 + 3.000i

 

Lfunction

object.REAL()    =  {double} left-value

object.IMG()     =  {double} left-value

Example:

->B.real() = 999

->B

ans =    999.000 + 3.000i

->B.img() = 360

->B

ans =    999.000 + 360.000i

 

Class function

 AMP  CONJ IMG INIT REAL

 


| HOME | BACK |