Lydos.Matlab

Matrix.Item Property (Int32)

Accesses the matrix as a vector.

[C#] In C#, this property is the indexer for the Matrix class.

[Visual Basic]
Public Default Property Item( _ 
   ByVal index As Integer _ 
) As Double
[C#]
public double this[
   int index
] { get; set; }
[C++]
public: __property double get_Item(
   int index
);
public: __property void set_Item(
   int index,
   double newValue
);
[JScript]
returnValue = MatrixObject.Item( index );
MatrixObject.Item( index ) = newValue;
-or-
returnValue = MatrixObject( index );
MatrixObject( index ) = newValue;

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Property Value

The element at the specified index of the vector.

Remarks

If this matrix is actually multidimensional, note that MATLAB stores matricies in column major order.

Exceptions

Exception TypeCondition
ObjectDisposedExceptionThrown when this has already been disposed.
ArgumentOutOfRangeExceptionThrown when index is less than zero or greater than the number of elements.

See Also

Matrix Class | Lydos.Matlab Namespace | Matrix.Item Overload List