`Matrix`

A two-dimensional matrix.

## Example

-- Create a default 2x2 double matrix of zerosm1 = pf.Matrix.Zeros(2)-- Assign values to each element of the matrixm1[1][1] = 1 m1[2][1] = 2 m1[1][2] = 3 m1[2][2] = 4-- Create a 2x2 double matrix with a fill value of 3m2 = pf.Matrix(2, 2, 3)-- Determine the transpose and determinant of the matrixtranspose = m1:Transpose() determinant = m1:Determinant()-- Some of the valid operators for 'Matrix'm3 = m1 * 2 m4 = m2 * (3 + j) m5 = m1 + 2 m6 = m1 - 1 m7 = m1 + m2 m8 = m1 - m2

## Usage locations

The Matrix object can be accessed from the following locations:

- Properties
- CharacteristicModeTrace object has property Values.
- CustomDataSmithTrace object has property Values.
- CustomDataTrace object has property Values.
- MathTrace object has property Values.
- SpiceProbeTrace object has property Values.
- FarFieldPowerIntegralTrace object has property Values.
- NearFieldPowerIntegralTrace object has property Values.
- TRCoefficientTrace object has property Values.
- LoadSmithTrace object has property Values.
- ExcitationSmithTrace object has property Values.
- SARTrace object has property Values.
- WireCurrentsTrace object has property Values.
- SParameterTrace object has property Values.
- PowerTrace object has property Values.
- LoadTrace object has property Values.
- ExcitationTrace object has property Values.
- FarFieldTrace object has property Values.
- NearFieldTrace object has property Values.
- ReceivingAntennaTrace object has property Values.
- NetworkTrace object has property Values.
- ResultTrace object has property Values.
- ComplexMatrix object has property Im.
- ComplexMatrix object has property Re.
- ComplexMatrix object has property re.
- ComplexMatrix object has property im.
- Matrix object has property Im.
- Matrix object has property Re.

- Methods
- Mesh object has method GetPointMatrixForTriangleMeshIndexList(List of number).
- Mesh object has method GetPointMatrixForSegmentMeshIndexList(List of number).
- DataSet object has method ToMatrix(List of string).
- DataSet object has method ToMatrix(List of string, string).
- DataSetIndexer object has method ToMatrix(List of string).
- ComplexMatrix object has method Abs().
- ComplexMatrix object has method Magnitude().
- ComplexMatrix object has method Angle().
- ComplexMatrix object has method Imag().
- ComplexMatrix object has method Phase().
- ComplexMatrix object has method Real().
- Matrix object has method Duplicate().
- Matrix object has method Inverse().
- Matrix object has method Transpose().
- Matrix object has method SubMatrix(number, number, number, number).
- Matrix object has method Abs().
- Matrix object has method Magnitude().
- Matrix object has method Angle().
- Matrix object has method Imag().
- Matrix object has method Phase().
- Matrix object has method Real().

- Static functions
- ComplexMatrix object has static function GreaterThanOrEqual(ComplexMatrix, ComplexMatrix).
- ComplexMatrix object has static function GreaterThan(ComplexMatrix, ComplexMatrix).
- ComplexMatrix object has static function LessThanOrEqual(ComplexMatrix, ComplexMatrix).
- ComplexMatrix object has static function LessThan(ComplexMatrix, ComplexMatrix).
- ComplexMatrix object has static function NotEqual(ComplexMatrix, ComplexMatrix).
- ComplexMatrix object has static function IsEqual(ComplexMatrix, ComplexMatrix).
- ComplexMatrix object has static function GreaterThanOrEqual(ComplexMatrix, Matrix).
- ComplexMatrix object has static function GreaterThan(ComplexMatrix, Matrix).
- ComplexMatrix object has static function LessThanOrEqual(ComplexMatrix, Matrix).
- ComplexMatrix object has static function LessThan(ComplexMatrix, Matrix).
- ComplexMatrix object has static function NotEqual(ComplexMatrix, Matrix).
- ComplexMatrix object has static function IsEqual(ComplexMatrix, Matrix).
- ComplexMatrix object has static function GreaterThanOrEqual(ComplexMatrix, Complex).
- ComplexMatrix object has static function GreaterThan(ComplexMatrix, Complex).
- ComplexMatrix object has static function LessThanOrEqual(ComplexMatrix, Complex).
- ComplexMatrix object has static function LessThan(ComplexMatrix, Complex).
- ComplexMatrix object has static function NotEqual(ComplexMatrix, Complex).
- ComplexMatrix object has static function IsEqual(ComplexMatrix, Complex).
- ComplexMatrix object has static function GreaterThanOrEqual(ComplexMatrix, number).
- ComplexMatrix object has static function GreaterThan(ComplexMatrix, number).
- ComplexMatrix object has static function LessThanOrEqual(ComplexMatrix, number).
- ComplexMatrix object has static function LessThan(ComplexMatrix, number).
- ComplexMatrix object has static function NotEqual(ComplexMatrix, number).
- ComplexMatrix object has static function IsEqual(ComplexMatrix, number).
- ComplexMatrix object has static function Real(ComplexMatrix).
- ComplexMatrix object has static function Imag(ComplexMatrix).
- ComplexMatrix object has static function Phase(ComplexMatrix).
- ComplexMatrix object has static function Angle(ComplexMatrix).
- ComplexMatrix object has static function Magnitude(ComplexMatrix).
- ComplexMatrix object has static function Abs(ComplexMatrix).
- Matrix object has static function Modulo(Matrix, Matrix).
- Matrix object has static function Modulo(Matrix, number).
- Matrix object has static function Atan2(Matrix, Matrix).
- Matrix object has static function Power(Matrix, Matrix).
- Matrix object has static function MultiplyByElement(Matrix, Matrix).
- Matrix object has static function Max(Matrix, Matrix).
- Matrix object has static function Min(Matrix, Matrix).
- Matrix object has static function GreaterThanOrEqual(Matrix, Matrix).
- Matrix object has static function GreaterThan(Matrix, Matrix).
- Matrix object has static function LessThanOrEqual(Matrix, Matrix).
- Matrix object has static function LessThan(Matrix, Matrix).
- Matrix object has static function NotEqual(Matrix, Matrix).
- Matrix object has static function IsEqual(Matrix, Matrix).
- Matrix object has static function MultiplyByElement(Matrix, number).
- Matrix object has static function Power(Matrix, number).
- Matrix object has static function GreaterThanOrEqual(Matrix, number).
- Matrix object has static function GreaterThan(Matrix, number).
- Matrix object has static function LessThanOrEqual(Matrix, number).
- Matrix object has static function LessThan(Matrix, number).
- Matrix object has static function NotEqual(Matrix, number).
- Matrix object has static function IsEqual(Matrix, number).
- Matrix object has static function Negate(Matrix).
- Matrix object has static function Magnitude(Matrix).
- Matrix object has static function Abs(Matrix).
- Matrix object has static function Zeros(number).
- Matrix object has static function Ones(number).
- Matrix object has static function Diagonal(List of number).
- Matrix object has static function Identity(number).
- Matrix object has static function New(number, List of number).
- Matrix object has static function New(List of number, number).
- Matrix object has static function New(number, number, number).
- Matrix object has static function New(number, number).
- Matrix object has static function Tan(Matrix).
- Matrix object has static function Sqrt(Matrix).
- Matrix object has static function Sin(Matrix).
- Matrix object has static function Log10(Matrix).
- Matrix object has static function Log(Matrix).
- Matrix object has static function Floor(Matrix).
- Matrix object has static function Exponent(Matrix).
- Matrix object has static function Ceil(Matrix).
- Matrix object has static function Cos(Matrix).
- Matrix object has static function Atan(Matrix).
- Matrix object has static function Asin(Matrix).
- Matrix object has static function Acos(Matrix).

## Property List

- ColumnCount
- The number of columns in the matrix. (Read only number)
- Im
- The imaginary component of the complex matrix. (Read/Write Matrix)
- Re
- The real component of the complex matrix. (Read/Write Matrix)
- RowCount
- The number of rows in the matrix. (Read only number)
- Type
- The object type string. (Read only string)

## Method List

- Abs ()
- Calculate the absolute value of all the entries in the matrix. (Returns a Matrix object.)
- Angle ()
- Calculate the angle of all the entries in the matrix. (Returns a Matrix object.)
- Conj ()
- Calculate the conjugate of all the entries in the matrix. (Returns a ComplexMatrix object.)
- Determinant ()
- Calculate the determinant of the matrix. (Returns a number object.)
- Duplicate ()
- Duplicate the matrix. (Returns a Matrix object.)
- ExportMatFile (
`filename`string,`varname`string) - Writes the given ComplexMatrix object to a *.mat file. (Returns a boolean object.)
- FFT ()
- Calculates the fast Fourier transform of the column or row matrix. For a matrix containing multiple columns and rows, the fast Fourier transform will be calculated for each of the columns. (Returns a ComplexMatrix object.)
- IFFT ()
- Calculates the inverse fast Fourier transform of the column or row matrix. For a matrix containing multiple columns and rows, the inverse fast Fourier transform will be calculated for each of the columns. (Returns a ComplexMatrix object.)
- Imag ()
- Extract the imaginary part of all the entries in the matrix. (Returns a Matrix object.)
- Inverse ()
- Calculate the inverse matrix. (Returns a Matrix object.)
- Magnitude ()
- Calculate the magnitude of all the entries in the matrix. (Returns a Matrix object.)
- Max ()
- Extracts the maximum from the matrix. (Returns a number object.)
- Mean ()
- Calculates the mean value of the elements of the matrix. (Returns a number object.)
- Min ()
- Extracts the minimum from the matrix. (Returns a number object.)
- Phase ()
- Calculate the phase of all the entries in the matrix. (Returns a Matrix object.)
- Real ()
- Extract the real part of all the entries in the matrix. (Returns a Matrix object.)
- ReplaceSubMatrix (
`matrix`Matrix,`rowstart`number,`columnstart`number) - Replace the sub matrix starting at the given indices with the provided matrix.
- SubMatrix (
`rowstart`number,`rowend`number,`columnstart`number,`columnend`number) - Obtain the sub matrix from the given parameters. (Returns a Matrix object.)
- Sum ()
- Calculates the sum of all the elements of the matrix. (Returns a number object.)
- Transpose ()
- Calculate the transpose of the matrix. (Returns a Matrix object.)

## Constructor Function List

- Diagonal (
`values`List of number) - Creates a diagonal matrix. (Returns a Matrix object.)
- Identity (
`size`number) - Creates an identity matrix. (Returns a Matrix object.)
- New (
`rows`number,`columnValues`List of number) - Creates a new matrix. (Returns a Matrix object.)
- New (
`rowValues`List of number,`columns`number) - Creates a new matrix. (Returns a Matrix object.)
- New (
`rows`number,`columns`number,`fill`number) - Creates a new matrix. (Returns a Matrix object.)
- New (
`rows`number,`columns`number) - Creates a new matrix with uninitialised elements. (Returns a Matrix object.)
- Ones (
`size`number) - Creates a new matrix filled with ones. (Returns a Matrix object.)
- Zeros (
`size`number) - Creates a new matrix filled with zeros. (Returns a Matrix object.)

## Static Function List

- Abs (
`matrix`Matrix) - Calculates the absolute value of each entry. (Returns a Matrix object.)
- Acos (
`matrix`Matrix) - Calculate the arc cosine of all the entries in the matrix. (Returns a Matrix object.)
- Asin (
`matrix`Matrix) - Calculate the arc sine of all the entries in the matrix. (Returns a Matrix object.)
- Atan (
`matrix`Matrix) - Calculate the arc tangent of all the entries in the matrix. (Returns a Matrix object.)
- Atan2 (
`matrix`Matrix,`matrix`Matrix) - Calculate the arc tangent of all the entries in the matrix. (Returns a Matrix object.)
- Ceil (
`matrix`Matrix) - Calculate the ceiling of all the elements in the matrix. (Returns a Matrix object.)
- Cos (
`matrix`Matrix) - Calculate the cosine of all the entries in the matrix. (Returns a Matrix object.)
- Exponent (
`matrix`Matrix) - Calculate the exponent of all the entries in the matrix. (Returns a Matrix object.)
- Find (
`matrix`Matrix) - Finds all entries in the matrix that are non-zero. (Returns a table object.)
- Floor (
`matrix`Matrix) - Calculate the floor of all the entries in the matrix. (Returns a Matrix object.)
- GreaterThan (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are greater than each other. (Returns a Matrix object.)
- GreaterThan (
`matrix`Matrix,`value`number) - Determines if a matrix has entries greater than the specified value. (Returns a Matrix object.)
- GreaterThanOrEqual (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are greater than or equal to each other. (Returns a Matrix object.)
- GreaterThanOrEqual (
`matrix`Matrix,`value`number) - Determines if a matrix has entries greater than or equal to the specified value. (Returns a Matrix object.)
- IsEqual (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are equal. (Returns a Matrix object.)
- IsEqual (
`matrix`Matrix,`value`number) - Determines if a matrix has entries equal to the specified value. (Returns a Matrix object.)
- LessThan (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are less than each other. (Returns a Matrix object.)
- LessThan (
`matrix`Matrix,`value`number) - Determines if a matrix has entries less than the specified value. (Returns a Matrix object.)
- LessThanOrEqual (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are less than or equal to each other. (Returns a Matrix object.)
- LessThanOrEqual (
`matrix`Matrix,`value`number) - Determines if a matrix has entries less than or equal to the specified value. (Returns a Matrix object.)
- Log (
`matrix`Matrix) - Calculate the log of all the entries in the matrix. (Returns a Matrix object.)
- Log10 (
`matrix`Matrix) - Calculate the log10 of all the entries in the matrix. (Returns a Matrix object.)
- Magnitude (
`matrix`Matrix) - Calculates the magnitude value of each entry. (Returns a Matrix object.)
- Max (
`matrix`Matrix,`matrix`Matrix) - Calculate the maximum of two corresponding entries from two matrices. (Returns a Matrix object.)
- Max (
`matrix`Matrix) - Calculate the maximum of all the entries in the matrix. (Returns a number object.)
- Mean (
`matrix`Matrix) - Calculate the mean of all the entries in the matrix. (Returns a number object.)
- Min (
`matrix`Matrix,`matrix`Matrix) - Calculate the minimum of two corresponding entries from two matrices. (Returns a Matrix object.)
- Min (
`matrix`Matrix) - Calculate the minimum of all the entries in the matrix. (Returns a number object.)
- Modulo (
`matrix`Matrix,`matrix`Matrix) - Calculates the Modulo of each entry with the corresponding entry in the second matrix. (Returns a Matrix object.)
- Modulo (
`matrix`Matrix,`value`number) - Calculates the Modulo of each entry with the value. (Returns a Matrix object.)
- MultiplyByElement (
`matrix`Matrix,`matrix`Matrix) - Calculate the exponent of all the elements in the matrix. (Returns a Matrix object.)
- MultiplyByElement (
`matrix`Matrix,`value`number) - Calculate the exponent of all the elements in the matrix. (Returns a Matrix object.)
- Negate (
`matrix`Matrix) - Negate each entry of the matrix. (Returns a Matrix object.)
- NotEqual (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are not equal. (Returns a Matrix object.)
- NotEqual (
`matrix`Matrix,`value`number) - Determines if a matrix has entries not equal to the specified value. (Returns a Matrix object.)
- Power (
`matrix`Matrix,`matrix`Matrix) - Raise all entries of the first matrix to the power of each entry in the second matrix. (Returns a Matrix object.)
- Power (
`matrix`Matrix,`exponent`number) - Raise each entry to the power of the exponent. (Returns a Matrix object.)
- Sin (
`matrix`Matrix) - Calculate the sine of all the entries in the matrix. (Returns a Matrix object.)
- Sqrt (
`matrix`Matrix) - Calculate the square root of all the entries in the matrix. (Returns a Matrix object.)
- Sum (
`matrix`Matrix) - Calculate the sum of all the entries in the matrix. (Returns a number object.)
- Tan (
`matrix`Matrix) - Calculate the tan of all the entries in the matrix. (Returns a Matrix object.)

## Index List

- [number]
- Access the specified row in the matrix. (Read MatrixIndexer)

## Property Details

- ColumnCount
- The number of columns in the matrix.
- Type
- number
- Access
- Read only

- Im
- The imaginary component of the complex matrix.
- Type
- Matrix
- Access
- Read/Write

- Re
- The real component of the complex matrix.
- Type
- Matrix
- Access
- Read/Write

- RowCount
- The number of rows in the matrix.
- Type
- number
- Access
- Read only

- Type
- The object type string.
- Type
- string
- Access
- Read only

## Method Details

- Abs ()
- Calculate the absolute value of all the entries in the matrix.
- Return
- Matrix
- The absolute value.

- Angle ()
- Calculate the angle of all the entries in the matrix.
- Return
- Matrix
- The angle.

- Conj ()
- Calculate the conjugate of all the entries in the matrix.
- Return
- ComplexMatrix
- The conjugate.

- Determinant ()
- Calculate the determinant of the matrix.
- Return
- number
- The determinant of the matrix.

- Duplicate ()
- Duplicate the matrix.
- Return
- Matrix
- The duplicated matrix.

- ExportMatFile (
`filename`string,`varname`string) - Writes the given ComplexMatrix object to a *.mat file.
- FFT ()
- Calculates the fast Fourier transform of the column or row matrix. For a matrix containing multiple columns and rows, the fast Fourier transform will be calculated for each of the columns.
- Return
- ComplexMatrix
- The calculated FFT complex matrix.

- IFFT ()
- Calculates the inverse fast Fourier transform of the column or row matrix. For a matrix containing multiple columns and rows, the inverse fast Fourier transform will be calculated for each of the columns.
- Return
- ComplexMatrix
- The calculated IFFT complex matrix.

- Imag ()
- Extract the imaginary part of all the entries in the matrix.
- Return
- Matrix
- The imaginary value.

- Inverse ()
- Calculate the inverse matrix.
- Return
- Matrix
- The inverse of the matrix.

- Magnitude ()
- Calculate the magnitude of all the entries in the matrix.
- Return
- Matrix
- The magnitude value.

- Max ()
- Extracts the maximum from the matrix.
- Return
- number
- The maximum value.

- Mean ()
- Calculates the mean value of the elements of the matrix.
- Return
- number
- The mean value.

- Min ()
- Extracts the minimum from the matrix.
- Return
- number
- The minimum value.

- Phase ()
- Calculate the phase of all the entries in the matrix.
- Return
- Matrix
- The phase.

- Real ()
- Extract the real part of all the entries in the matrix.
- Return
- Matrix
- The real value.

- ReplaceSubMatrix (
`matrix`Matrix,`rowstart`number,`columnstart`number) - Replace the sub matrix starting at the given indices with the provided matrix.
- SubMatrix (
`rowstart`number,`rowend`number,`columnstart`number,`columnend`number) - Obtain the sub matrix from the given parameters.
- Sum ()
- Calculates the sum of all the elements of the matrix.
- Return
- number
- The sum.

- Transpose ()
- Calculate the transpose of the matrix.
- Return
- Matrix
- The transpose of the matrix.

## Static Function Details

- Abs (
`matrix`Matrix) - Calculates the absolute value of each entry.
- Acos (
`matrix`Matrix) - Calculate the arc cosine of all the entries in the matrix.
- Asin (
`matrix`Matrix) - Calculate the arc sine of all the entries in the matrix.
- Atan (
`matrix`Matrix) - Calculate the arc tangent of all the entries in the matrix.
- Atan2 (
`matrix`Matrix,`matrix`Matrix) - Calculate the arc tangent of all the entries in the matrix.
- Ceil (
`matrix`Matrix) - Calculate the ceiling of all the elements in the matrix.
- Cos (
`matrix`Matrix) - Calculate the cosine of all the entries in the matrix.
- Diagonal (
`values`List of number) - Creates a diagonal matrix.
- Exponent (
`matrix`Matrix) - Calculate the exponent of all the entries in the matrix.
- Find (
`matrix`Matrix) - Finds all entries in the matrix that are non-zero.
- Floor (
`matrix`Matrix) - Calculate the floor of all the entries in the matrix.
- GreaterThan (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are greater than each other.
- GreaterThan (
`matrix`Matrix,`value`number) - Determines if a matrix has entries greater than the specified value.
- GreaterThanOrEqual (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are greater than or equal to each other.
- GreaterThanOrEqual (
`matrix`Matrix,`value`number) - Determines if a matrix has entries greater than or equal to the specified value.
- Identity (
`size`number) - Creates an identity matrix.
- IsEqual (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are equal.
- IsEqual (
`matrix`Matrix,`value`number) - Determines if a matrix has entries equal to the specified value.
- LessThan (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are less than each other.
- LessThan (
`matrix`Matrix,`value`number) - Determines if a matrix has entries less than the specified value.
- LessThanOrEqual (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are less than or equal to each other.
- LessThanOrEqual (
`matrix`Matrix,`value`number) - Determines if a matrix has entries less than or equal to the specified value.
- Log (
`matrix`Matrix) - Calculate the log of all the entries in the matrix.
- Log10 (
`matrix`Matrix) - Calculate the log10 of all the entries in the matrix.
- Magnitude (
`matrix`Matrix) - Calculates the magnitude value of each entry.
- Max (
`matrix`Matrix,`matrix`Matrix) - Calculate the maximum of two corresponding entries from two matrices.
- Max (
`matrix`Matrix) - Calculate the maximum of all the entries in the matrix.
- Mean (
`matrix`Matrix) - Calculate the mean of all the entries in the matrix.
- Min (
`matrix`Matrix,`matrix`Matrix) - Calculate the minimum of two corresponding entries from two matrices.
- Min (
`matrix`Matrix) - Calculate the minimum of all the entries in the matrix.
- Modulo (
`matrix`Matrix,`matrix`Matrix) - Calculates the Modulo of each entry with the corresponding entry in the second matrix.
- Modulo (
`matrix`Matrix,`value`number) - Calculates the Modulo of each entry with the value.
- MultiplyByElement (
`matrix`Matrix,`matrix`Matrix) - Calculate the exponent of all the elements in the matrix.
- MultiplyByElement (
`matrix`Matrix,`value`number) - Calculate the exponent of all the elements in the matrix.
- Negate (
`matrix`Matrix) - Negate each entry of the matrix.
- New (
`rows`number,`columnValues`List of number) - Creates a new matrix.
- New (
`rowValues`List of number,`columns`number) - Creates a new matrix.
- New (
`rows`number,`columns`number,`fill`number) - Creates a new matrix.
- New (
`rows`number,`columns`number) - Creates a new matrix with uninitialised elements.
- NotEqual (
`matrix`Matrix,`matrix`Matrix) - Determines if the entries of two matrices are not equal.
- NotEqual (
`matrix`Matrix,`value`number) - Determines if a matrix has entries not equal to the specified value.
- Ones (
`size`number) - Creates a new matrix filled with ones.
- Power (
`matrix`Matrix,`matrix`Matrix) - Raise all entries of the first matrix to the power of each entry in the second matrix.
- Power (
`matrix`Matrix,`exponent`number) - Raise each entry to the power of the exponent.
- Sin (
`matrix`Matrix) - Calculate the sine of all the entries in the matrix.
- Sqrt (
`matrix`Matrix) - Calculate the square root of all the entries in the matrix.
- Sum (
`matrix`Matrix) - Calculate the sum of all the entries in the matrix.
- Tan (
`matrix`Matrix) - Calculate the tan of all the entries in the matrix.
- Zeros (
`size`number) - Creates a new matrix filled with zeros.