reshape(A,m,n) returns a m-by-n matrix produced from the values in A. A may be any size and is scanned repeatedly if necessary, row-by-row, until m*n values are obtained. reshape(1,m,n) is the same as ones(m,n) reshape([1 0 0 0],3,3) is the same as eye(3,3)