Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function
reshape a vector or a matrix to a different size matrix
a vector, a matrix or a hypermatrix
vector of integers
a vector, a matrix or hypermatrix
For a vector or a matrix with
m entries, the command
y=matrix(v,n,m) or similarly
v vector (or matrix) into an
nxm matrix by
stacking columnwise the entries of
If one of the dimension
n is equal to -1 it is automatically
assigned to the quotient of
size(v,'*') by the other dimension.
For a hypermatrix such as
prod(size(v))==prod(sizes), the command
v into an matrix or hypermatrix by
stacking "columnwise" (first dimension is varying first) the entries of
results in a regular matrix if sizes is a scalar or a 2-vector.
a=[1 2 3;4 5 6] matrix(a,1,6) matrix(a,1,-1) matrix(a,3,2)
|Report an issue|
|<< flipdim||Matrix manipulation||permute >>|