Complex Class Function Manual

AMP

| HOME | BACK |

Purpose

To report the amplitude of a complex number.  It is the square root of the summation of square of the real part and square of the imaginary part.

Class

Complex

Usage

{double} ret  =  object.AMP()

Example:

->a = Complex(9,2)
->a.amp()

ans =    9.21954

->

See also (class function)

 

| HOME | BACK |


CONJ

| HOME | BACK |

Purpose

To generate a complex conjugate of a complex number.

Class

Complex

Usage

{Complex} ret  =  object.CONJ()

Example:

->a = Complex(9,2)
->b = a.conj()
->print b
9.00000 - 2.00000i
->

See also (class function)

 

| HOME | BACK |


IMG

| HOME | BACK |

Purpose

To get the imaginary part of a complex number.

Class

Complex

Usage

{double} ret  =  object.IMG()

Example:

->a = Complex(9,2)
->a.img()

ans =     2.00000

->

See also (class function)

real

| HOME | BACK |


INIT

| HOME | BACK |

Purpose

To

initialize a complex number object.

Class

Complex

Usage

{void} object.INIT({double} argm1, {double} argm2)

argm1 = real part

argm2 = imaginary part

Example:

->a = Complex()
->a.init(9,2)
->print a
   9.00000  +  2.00000i
->

See also (class function)

real, img

| HOME | BACK |


REAL

| HOME | BACK |

Purpose

To get the real part of a complex number.

Class

Complex

Usage

{double} ret  =  object.REAL()

Example:

->a = Complex(9,2)
->a.real()

ans =     9.00000

->

See also (class function)

 

| HOME | BACK |