vflatten.m 181 B

12345678910111213
  1. function f = vflatten(m)
  2. % function f = vflatten(m)
  3. %
  4. % <m> is a matrix
  5. %
  6. % return as a column vector.
  7. %
  8. % example:
  9. % a = [1 2; 3 4];
  10. % isequal(vflatten(a),[1 3 2 4]')
  11. f = m(:);