Complex
A complex number.
Example
-- Create a complex number c1 = pf.Complex(3,4) -- Determine magnitude and phase of the complex number mag = c1:Magnitude() phase = c1:Phase() -- Some of the valid operators for 'Complex' c2 = 2 + j*1 c3 = c1 * 2 c4 = c1 / 2 c5 = c1 - c2 c6 = c1 + c2 c7 = c1 * c2 c8 = c1.re * c2.re
Usage locations
The Complex object can be accessed from the following locations:
- Properties
- Methods
- Complex object has method Conjugate().
- Complex object has method Conj().
- ComplexMatrix object has method Determinant().
- ComplexMatrix object has method Max().
- ComplexMatrix object has method Min().
- ComplexMatrix object has method Mean().
- ComplexMatrix object has method Sum().
- Static functions
- Complex object has static function Conj(number).
- Complex object has static function Conj(Complex).
- Complex object has static function Conjugate(number).
- Complex object has static function Conjugate(Complex).
- Complex object has static function Tan(Complex).
- Complex object has static function Sqrt(Complex).
- Complex object has static function Sin(Complex).
- Complex object has static function Power(Complex, Complex).
- Complex object has static function Power(Complex, number).
- Complex object has static function Log10(Complex).
- Complex object has static function Log(Complex).
- Complex object has static function Floor(Complex).
- Complex object has static function Exponent(Complex).
- Complex object has static function Ceil(Complex).
- Complex object has static function Cos(Complex).
- Complex object has static function Atan(Complex).
- Complex object has static function Asin(Complex).
- Complex object has static function Acos(Complex).
- Complex object has static function New(number, number).
- Complex object has static function New(number).
- Complex object has static function New().
- ComplexMatrix object has static function SumTotal(ComplexMatrix).
- ComplexMatrix object has static function Average(ComplexMatrix).
- ComplexMatrix object has static function MinValue(ComplexMatrix).
- ComplexMatrix object has static function MaxValue(ComplexMatrix).
Property List
Method List
- Abs ()
- Returns the absolute value of the complex value. Same as the magnitude. (Returns a number object.)
- Angle ()
- Returns the angle of the complex value in radians. Same as the phase. (Returns a number object.)
- Conj ()
- Returns the complex conjugate of the complex value. (Returns a Complex object.)
- Conjugate ()
- Returns the complex conjugate of the complex value. (Returns a Complex object.)
- Imag ()
- Returns the imaginary component of the complex value. (Returns a number object.)
- IsInfinite ()
- Returns true if either the real or imaginary part is infinite, returns false if both parts are finite. (Returns a boolean object.)
- IsNotANumber ()
- Returns true if either the real or imaginary part is not a number, returns false if both parts are valid. (Returns a boolean object.)
- Magnitude ()
- Returns the magnitude of the complex value. (Returns a number object.)
- Phase ()
- Returns the phase of the complex value in radians. (Returns a number object.)
- Real ()
- Returns the real component of the complex value. (Returns a number object.)
Constructor Function List
Static Function List
- Abs (real number)
- Calculates the absolute value of the complex value. (Returns a number object.)
- Abs (complex Complex)
- Calculates the absolute value of the complex value. (Returns a number object.)
- Acos (complex Complex)
- Calculates arc cosine of a complex value. (Returns a Complex object.)
- Angle (real number)
- Returns the angle of the complex value in radians. (Returns a number object.)
- Angle (complex Complex)
- Returns the angle of the complex value in radians. (Returns a number object.)
- Asin (complex Complex)
- Calculates arc sine of a complex value. (Returns a Complex object.)
- Atan (complex Complex)
- Calculates arc tan of a complex value. (Returns a Complex object.)
- Ceil (complex Complex)
- Calculates the ceiling of each component of a complex value. (Returns a Complex object.)
- Conj (real number)
- Returns the complex conjugate of the complex value. (Returns a Complex object.)
- Conj (complex Complex)
- Returns the complex conjugate of the complex value. (Returns a Complex object.)
- Conjugate (real number)
- Calculates the complex conjugate of the complex value. (Returns a Complex object.)
- Conjugate (complex Complex)
- Calculates the complex conjugate of the complex value. (Returns a Complex object.)
- Cos (complex Complex)
- Calculates cosine of a complex value. (Returns a Complex object.)
- Exponent (complex Complex)
- Calculates exponent of a complex value. (Returns a Complex object.)
- Floor (complex Complex)
- Calculates the floor of each component a complex value. (Returns a Complex object.)
- Imag (complex number)
- Returns the imaginary component of the complex value. (Returns a number object.)
- Imag (complex Complex)
- Returns the imaginary component of the complex value. (Returns a number object.)
- IsEqual (param complex1 Complex, param complex2 Complex)
- Compares two complex numbers. (Returns a boolean object.)
- IsEqual (param complex Complex, param value number)
- Compares a complex number with a real number. (Returns a boolean object.)
- IsInfinite (complex Complex)
- Returns true if either the real or imaginary part is infinite, returns false if both parts are finite. (Returns a boolean object.)
- IsNotANumber (complex Complex)
- Returns true if either the real or imaginary part is not a number, returns false if both parts are valid. (Returns a boolean object.)
- Log (complex Complex)
- Calculates the log of a complex value. (Returns a Complex object.)
- Log10 (complex Complex)
- Calculates the log10 of a the complex value. (Returns a Complex object.)
- Magnitude (real number)
- Calculates the magnitude of the complex value. (Returns a number object.)
- Magnitude (complex Complex)
- Calculates the magnitude of the complex value. (Returns a number object.)
- Phase (real number)
- Calculates the phase of the complex value in radians. (Returns a number object.)
- Phase (complex Complex)
- Calculates the phase of the complex value in radians. (Returns a number object.)
- Power (complex Complex, complex Complex)
- Calculates the power of a the complex value with a complex exponent. (Returns a Complex object.)
- Power (complex Complex, value number)
- Calculates the power of a complex value with a real exponent. (Returns a Complex object.)
- Real (real number)
- Returns the real component of the complex value. (Returns a number object.)
- Real (complex Complex)
- Returns the real component of the complex value. (Returns a number object.)
- Sin (complex Complex)
- Calculates the sine value of the complex value. (Returns a Complex object.)
- Sqrt (complex Complex)
- Calculates the square root value of the complex value. (Returns a Complex object.)
- Tan (complex Complex)
- Calculates the tan value of the complex value. (Returns a Complex object.)
Index List
Property Details
Method Details
- Abs ()
- Returns the absolute value of the complex value. Same as the magnitude.
- Return
- number
- The absolute value of the complex value.
- Angle ()
- Returns the angle of the complex value in radians. Same as the phase.
- Return
- number
- The angle of the complex value.
- Conj ()
- Returns the complex conjugate of the complex value.
- Return
- Complex
- The complex conjugate of the complex value.
- Conjugate ()
- Returns the complex conjugate of the complex value.
- Return
- Complex
- The complex conjugate of the complex value.
- Imag ()
- Returns the imaginary component of the complex value.
- Return
- number
- The imaginary component of the complex value.
- IsInfinite ()
- Returns true if either the real or imaginary part is infinite, returns false if both parts are finite.
- Return
- boolean
- True if either part is Inf.
- IsNotANumber ()
- Returns true if either the real or imaginary part is not a number, returns false if both parts are valid.
- Return
- boolean
- True if either part is NaN.
- Magnitude ()
- Returns the magnitude of the complex value.
- Return
- number
- The magnitude of the complex value.
- Phase ()
- Returns the phase of the complex value in radians.
- Return
- number
- The phase of the complex value.
- Real ()
- Returns the real component of the complex value.
- Return
- number
- The real component of the complex value.
Static Function Details
- Abs (real number)
- Calculates the absolute value of the complex value.
- Abs (complex Complex)
- Calculates the absolute value of the complex value.
- Acos (complex Complex)
- Calculates arc cosine of a complex value.
- Angle (real number)
- Returns the angle of the complex value in radians.
- Angle (complex Complex)
- Returns the angle of the complex value in radians.
- Asin (complex Complex)
- Calculates arc sine of a complex value.
- Atan (complex Complex)
- Calculates arc tan of a complex value.
- Ceil (complex Complex)
- Calculates the ceiling of each component of a complex value.
- Conj (real number)
- Returns the complex conjugate of the complex value.
- Conj (complex Complex)
- Returns the complex conjugate of the complex value.
- Conjugate (real number)
- Calculates the complex conjugate of the complex value.
- Conjugate (complex Complex)
- Calculates the complex conjugate of the complex value.
- Cos (complex Complex)
- Calculates cosine of a complex value.
- Exponent (complex Complex)
- Calculates exponent of a complex value.
- Floor (complex Complex)
- Calculates the floor of each component a complex value.
- Imag (complex number)
- Returns the imaginary component of the complex value.
- Imag (complex Complex)
- Returns the imaginary component of the complex value.
- IsEqual (param complex1 Complex, param complex2 Complex)
- Compares two complex numbers.
- IsEqual (param complex Complex, param value number)
- Compares a complex number with a real number.
- IsInfinite (complex Complex)
- Returns true if either the real or imaginary part is infinite, returns false if both parts are finite.
- IsNotANumber (complex Complex)
- Returns true if either the real or imaginary part is not a number, returns false if both parts are valid.
- Log (complex Complex)
- Calculates the log of a complex value.
- Log10 (complex Complex)
- Calculates the log10 of a the complex value.
- Magnitude (real number)
- Calculates the magnitude of the complex value.
- Magnitude (complex Complex)
- Calculates the magnitude of the complex value.
- New (real number, imag number)
- Creates a new complex.
- New (real number)
- Creates a new complex.
- New ()
- Creates a new complex.
- Return
- Complex
- The new complex.
- Phase (real number)
- Calculates the phase of the complex value in radians.
- Phase (complex Complex)
- Calculates the phase of the complex value in radians.
- Power (complex Complex, complex Complex)
- Calculates the power of a the complex value with a complex exponent.
- Power (complex Complex, value number)
- Calculates the power of a complex value with a real exponent.
- Real (real number)
- Returns the real component of the complex value.
- Real (complex Complex)
- Returns the real component of the complex value.
- Sin (complex Complex)
- Calculates the sine value of the complex value.
- Sqrt (complex Complex)
- Calculates the square root value of the complex value.
- Tan (complex Complex)
- Calculates the tan value of the complex value.