objectToMatrix
|
The objectToMatrix function converts the object {object} into a
Matrix returning the new Matrix. The {object} may be a List, Vector,
Matrix, Structure, Dictionary, or a Directory. If the object is already a
Matrix, it is returned unchanged. If it is any other type of Matrix
(e.g., NumMatrix), it is converted into a regular matrix. A Vector is converted into
a Matrix. An object vector containing vectors is converted into a two-dimensional
matrix. Each of these vectors is converted to one row of the matrix. 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. Usage The objectToMatrix function is used to convert a Vector, List, Matrix,
Structure, Directory or Dictionary object to a Matrix object.
(objectToMatrix object rank dim1 dim2 dim3) A Matrix object
Expression:
Arguments
Name
Type
Description Argument: obj Vector List Matrix Structure
Dictionary Directory
A Vector, List, Matrix, Structure, Dictionary or Directory Object Argument: rank Integer
Optional. Rank of the resulting matrix (1, 2, 3) Argument: dim1 Integer
Optional. Size of the first dimension of the resulting matrix Argument: dim2 Integer
Optional. Size of the second dimension of the resulting matrix Argument: dim3 Integer
Optional. Size of the third dimension of the resulting matrix
Returns:
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments.
Vector | NumVector | List | Matrix |
Structure | Dictionary | Directory | Integer |
Real | Number | Complex |
Here are also a number of links to functions having arguments with any of these data types.
Analytic Information Server (AIS)AIS Component Systems
|