vec2mat
(Not recommended) Change dimension
vec2mat is not recommended. Use reshape instead. For more information, see Version History.
Description
converts vector mat = vec2mat(vec,matcol)vec to matrix mat with
matcol columns. The function creates the matrix one row at a time,
filling the rows with elements from vec in order. If the length of
vec is not a multiple of matcol, then the
function pads the last row of mat with zeros until the row contains
matcol elements.