Provides access to a Matlab matrix of real doubles.
For a list of all members of this type, see Matrix Members.
System.Object
Lydos.Matlab.Matrix
[Visual Basic] Public Class Matrix Implements IDisposable [C#] public class Matrix : IDisposable [C++] public __gc class Matrix : public IDisposable [JScript] public class Matrix extends IDisposable
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
All C# multidimensional arrays are created and accessed in row-column order, i.e. Item[row, col]
and Item[row][col]
. Flat C# arrays can be treated as column or row vectors (matrices with one column or one row, respectively), or as matrices stored in either row-major or column-major order. For row major order (the default for C programs), items are accessed "row first" (rows are stored sequentially). For column major order (the default for Fortran and MATLAB), items are accessed "column first" (columns are stored sequentially). See the following detailed example for an explanation:
Matrix: Col __0__1__2_ Row | 0 | A B C 1 | D E FIn row major order,
Item[row, col] = Item[row * Cols + col]
: Item: A B C D E F Row, Col: 0,0 0,1 0,2 1,0 1,1 1,2 Flat Index: 0*3+0 0*3+1 0*3+1 1*3+0 1*3+1 1*3+2 = 0 = 1 = 2 = 3 = 4 = 5In column major order,
Item[row, col] = Item[col * Rows + row]
: Item: A D B E C F Row, Col: 0,0 1,0 0,1 1,1 0,2 1,2 Col, Row: 0,0 0,1 1,0 1,1 2,0 2,1 Flat Index: 0*2+0 0*2+1 1*2+0 1*2+1 2*2+0 2*2+1 = 0 = 1 = 2 = 3 = 4 = 5
Namespace: Lydos.Matlab
Assembly: Lydos.Matlab (in Lydos.Matlab.dll)