Matrix Reshaping Functions

BLOCK function

forms block-diagonal matrices

BTRAN function

computes a block transpose

COLVEC function

converts a matrix into a column vector

DIAG function

creates a diagonal matrix

DO function

produces an arithmetic series

EXPANDGRID function

returns a matrix that contains all combinations of elements from specified vectors

FULL function

converts a matrix stored in a sparse format into a full (dense) matrix

I function

creates an identity matrix

INSERT function

inserts one matrix inside another

J function

creates a matrix of identical values

MAGIC function

returns a magic square of a given size

REMOVE function

discards elements from a matrix

REPEAT function

creates a new matrix of repeated values

ROWVEC function

converts a matrix into a row vector

SHAPE function

reshapes and repeats values

SHAPECOL function

reshapes and repeats values by columns

SPARSE function

converts a matrix that contains many zeros into a matrix stored in a sparse format

SQRSYM function

converts a symmetric matrix to a square matrix

SQRVECH function

converts a symmetric matrix which is stored columnwise to a square matrix

SYMSQR function

converts a square matrix to a symmetric matrix

T function

transposes a matrix

VECH function

creates a vector from the columns of the lower triangular elements of a matrix

VECDIAG function

creates a vector from a diagonal