|
4.4.3 intmat type cast
Syntax:
intmat ( expression )
intmat ( expression, int_n, int_m )
Type:
intmat
Purpose:
Converts expression to an intmat, where expression must be of type
intvec, or intmat. If
int_n and int_m are supplied, then they specify the dimension of the
intmat. Otherwise, the size (resp. dimensions) of the intmat
are determined by the size (resp. dimensions) of the
expression.
Example:
intmat(intvec(1));
→ 1
intmat(intvec(1), 1, 2);
→ 1,0
intmat(intvec(1,2,3,4), 2, 2);
→ 1,2,
→ 3,4
intmat(_, 2, 3);
→ 1,2,3,
→ 4,0,0
intmat(_, 2, 1);
→ 1,
→ 2
See
Type conversion and casting;
intmat;
matrix type cast.
|