MATRIX TO VARIABLE
Name:
Type:
Purpose:
Convert a matrix to a variable.
Description:
There may be times when it is desirable to convert a matrix
to a variable. This command provides a simple and convenient
method for converting a matrix to a variable.
Syntax:
LET <y> = MATRIX TO VARIABLE <m>
<SUBSET/EXPCEPT/FOR qualification>
where <m> is the previously created matrix;
<y> is the resulting response variable;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
LET Y = MATRIX TO VARIABLE M
Note:
By default, the variable is created in column order from the
matrix. That is, column 1 of the matrix is extracted, then
column 2 of the matrix, and so on. To create the variable in
row order, enter the command
SET MATRIX TO VARIABLE ROW
To restore column order, enter
SET MATRIX TO VARIABLE COLUMN
Note:
Default:
Synonyms:
Related Commands:
Applications:
Implementation Date:
Program:
READ MATRIX M
1 2 3
4 5 6
7 8 9
END OF DATA
.
LET Y1 = MATRIX TO VARIABLE M
SET MATRIX TO VARIABLES ROW
LET Y2 = MATRIX TO VARIABLE M
SET WRITE DECIMALS 1
PRINT Y1 Y2
The following output is generated
------------------------------
Y1 Y2
------------------------------
1.0 1.0
4.0 2.0
7.0 3.0
2.0 4.0
5.0 5.0
8.0 6.0
3.0 7.0
6.0 8.0
9.0 9.0
Date created: 11/30/2010
Last updated: 11/30/2010
Please email comments on this WWW page to
[email protected].
|