2.2.3.9 matrixbase


Name

matrixbase

Remark

The Origin C matrixbase class is an abstract base class used for polymorphic handling of the matrix and Matrix template class types. Origin C objects of type matrixbase can not be constructed. Derived classes such as matrix and Matrix inherit matrixbase class methods and should be used instead.

Hierarchy

Examples

EX1

int matrixbase_ex1()
{
    matrix mat(2,3) ={ { 11, 12, 13}, { 21, 22, 23}};
    return 0;
}

Header to Include

origin.h

Reference

Members

Name Brief Example
AllNonZero Indicates whether or not an entire row or column of this matrix is comprised of all non-zero elements. Examples
AnyNonZero Indicates whether or not each row or column of this matrix contains any non-zero elements. Examples
ApplyFilter Apply filter. Examples
CastToDouble An explicit class memeber function to copy this matrix and casting the underlying base type to double for each element. You can also just use assignment to do the same thing. Examples
CastToInteger Round this matrix placing the results in a matrix having an underlying base type of int. Examples
Ceil Round each cell of this matrix to the nearest integer greater than the current cell value (toward positive infinity). Examples
Concatenate Concatenate a matrix to this matrix placing the results in a third matrix. Examples
Conjugate Replace this matrix with the Conjugate of this matrix. Examples
CopyFromWks Copies a specified range from a worksheet to a matrix. Examples
CopyTo Copy a subset of this matrix specified by 0 based column and row indices to a worksheet object Examples
Cross calculate the cross between two matrixs as row wise or column wise Examples
CumulativeProduct Compute the cumulative product of this matrix Examples
CumulativeSum Compute the cumulative sum of this matrix Examples
Difference Compute the N-th order row wise or column wise difference of the elements in this matrix. Examples
DotDivide Divide this matrix by another matrix. Examples
DotMultiply Multiply two matrices element by element. Examples
DotPower Raise this matrix to the power of another matrix. Examples
FFTShift Shift this matrix placing the result in the matrix passed as an argument. Examples
Find Function to find all instances of a value in a matrix Examples
Fix Round each cell of this matrix to the nearest integer (toward zero). Examples
FlipHorizontal Horizontally flips this matrixbase derived object. Examples
FlipVertical Vertically flips this matrixbase derived object. Examples
Floor Round each cell of this matrix to the nearest integer less than the current cell value (toward minus infinity). Examples
FreqFilter Generation Function to Create Filter Examples
GetAmplitude Get the amplitude(modulus) of the Complex matrix. Examples
GetAsVector Get the values of an entire matrix and assign them to a vector. Examples
GetColumn Get the values of a matrix column and assign them to a vector. Examples
GetDiagonal Get the diagonal or N-th diagonal of this matrix. Examples
GetImaginary Get the Imaginary part of a Complex matrix. Examples
GetInternalDataType Get the internal or underlying base data type of a matrixbase derived object. Examples
GetLowerTriangular Get a lower triangular matrix from this matrix. Examples
GetMax Returns the maximum cell value in the matrix. Examples
GetMean Get the mean cell value of the matrix (as a double). Examples
GetMedian Get the median cell value of the matrix (as a double). If there are an even number N of cells in the matrix the average of the N/2 and (N+1)/2 sorted cell values is returned. Examples
GetMin Get the minimum cell value in the matrix (as a double). Examples
GetNumCols Get the number of columns in any matrixbase derived object (e.g. matrix, Matrix). Examples
GetNumRows Get the number of rows in any matrixbase derived object (e.g. matrix, Matrix). Examples
GetPhase Get the phase angle matrix, in radians, of the Complex matrix. Examples
GetReal Get the Real part of a Complex matrix. Examples
GetRow Get the values of a matrix row and assign them to a vector. Examples
GetSubMatrix -1 means to last col/row Examples
GetUpperTriangular Get an upper triangular matrix from this matrix. Examples
IFFTShift Inverse FFTShift. Examples
Inverse Replace this matrix with the Inverse of this matrix. Examples
MakeComplex Make a Complex matrix from two Real matrices. Examples
MakeIdentity Make this matrix an N x N identity matrix or an M x N rectangular matrix with 1's on the diagonal and zeros elsewhere. Examples
MedianFilter Median filter. Examples
MeshGrid Get 2-D grid matrices based on the coordinates contained in vectors vX and vY. Examples
Padding Pad a matrix with selected way Examples
PutRecordset put recordset into the Matrix Examples
RemoveEmptyRows Remove empty rows from matrix Examples
Reorder Re-order a matrix from Column order to Row order or from Row order to Column order. Examples
ReorderColWise rearrange the matrix in column-wise according to the given indices Examples
ReorderRowWise rearrange the matrix in row-wise according to the given indices Examples
Replace Threshold replace for a matrix. Examples
ReplaceGreaterThan Replace all cell values greater than dThresholdVal with dReplaceVal. Examples
ReplaceLessThan Replace all cell values less than dThresholdVal with dReplaceVal. Examples
Rotate Rotates the matrix counter-clockwize by the specified angle. Examples
Round Round each cell of this matrix to the nearest integer (absolute nearest). Examples
SetByText Set the values of a matrix by separated values in a string. Examples
SetByVector Set the values of a matrix equal to the values of a vector. Examples
SetColumn Set the values of a matrix column equal to the values of a vector. Examples
SetDiagonal Set the diagonal or N-th diagonal of this matrix. Examples
SetRow Set the values of a matrix row equal to the values of a vector. Examples
SetSize Set the size of any matrixbase derived object. Examples
SetSubMatrix Set a subset of this matrix specified by 0 based column and row indices. The source and target matrices can have different types and different dimensions but the target matrix is never resized even if the source matrix is larger than the target. Examples
Shrink Shrink this matrix by averaging cell values together according to the column and row shrink factors. This is similar to the LabTalk mat.Shrink() method. Examples
Sort Sort a matrix in row order (across rows from top/left to bottom/right). Examples
SumColumns Sum the columns of this matrix placing the result in a vector. Examples
Transpose Transpose a matrix. Examples
Wrap Wrap around elements. Examples