|
objectToNumMatrix
|
The objectToNumMatrix function converts the object {object} into a
NumMatrix returning the new Matrix. The {object} may be a List, Vector,
Matrix, Structure, Dictionary, or a Directory. If the object is already a
NumMatrix, it is returned unchanged. If it is any other type of Matrix
(e.g., Matrix), it is converted into a number matrix. A Vector is converted into a
Matrix. An object vector containing vectors is converted into a two-dimensional
number matrix. Each of these vectors is converted to one row of the number matrix.
An element that cannot be converted to a number is converted to zero. An object
vector containing object vectors that each contain a vector is converted into a
three-dimensional matrix. Each of these object vectors contains one plane of the
matrix (first dimension). Each plane is converted into rows as described above for
two-dimensional matrices. Several examples are shown below. If a vector is being converted, an optional rank and the dimensions of the resulting
matrix may be specified. If no rank is provided, the vector is converted to a
one-dimensional matrix. When to use The objectToNumMatrix function is used to convert a Vector, List, Matrix,
Structure, Directory or Dictionary object to a NumMatrix object.
(objectToNumMatrix object rank dim1 dim2 dim3) A NumMatrix object
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_NumMatrix_objectToNumMatrix_001
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types obj A Vector, List, Matrix, Structure, Dictionary or Directory Object Vector List Matrix Structure
Dictionary Directory rank Optional. Rank of the resulting matrix (1, 2, 3) Integer dim1 Optional. Size of the first dimension of the resulting matrix Integer dim2 Optional. Size of the second dimension of the resulting matrix Integer dim3 Optional. Size of the third dimension of the resulting matrix Integer
Returns:
Examples
Argument Types
Vector
NumVector
List
Matrix
Structure
Dictionary
Directory
Integer
Real
Number
Complex
How do I contact the AIS team?