Language Reference
ROWVEC Function
ROWVEC (matrix) ;
This function is supported by the IML procedure and the iml action.
The ROWVEC function is part of the IMLMLIB library. The ROWVEC function returns a vector. The specified matrix is converted into a row vector in row-major order. The returned vector has 1 row and
columns. The first m elements in the vector correspond to the first row of the input matrix, the next m elements correspond to the second row, and so on, on, as shown in the following example.
x = {1 2 3,
4 5 6};
y = rowvec(x);
print y;
Figure 374: A Row Vector
| y | |||||
|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 |
See the COLVEC function for converting a matrix into a column vector.
Last updated: May 07, 2026