In MATLAB, the m(:)
expression is used to reshape a matrix m
to a column vector.
For example, consider the following matrix:
main.m22 chars2 lines
Using m(:)
yields the following column vector:
main.m19 chars2 lines
This can be useful when performing certain matrix operations, such as matrix multiplication or inversion.
gistlibby LogSnag