sizefull.m 359 B

1234567891011121314
  1. function f = sizefull(m,numdims)
  2. % function f = sizefull(m,numdims)
  3. %
  4. % <m> is a matrix
  5. % <numdims> is the number of dimensions desired
  6. %
  7. % return the size of <m> with respect to the first <numdims> dimensions.
  8. % the result is a vector of length <numdims>.
  9. %
  10. % example:
  11. % isequal(sizefull([1 2 3],3),[1 3 1])
  12. f = placematrix(ones(1,numdims),size(m),[1 1]);