function f = sizefull(m,numdims) <m> is a matrix <numdims> is the number of dimensions desired return the size of <m> with respect to the first <numdims> dimensions. the result is a vector of length <numdims>. example: isequal(sizefull([1 2 3],3),[1 3 1])
0001 function f = sizefull(m,numdims) 0002 0003 % function f = sizefull(m,numdims) 0004 % 0005 % <m> is a matrix 0006 % <numdims> is the number of dimensions desired 0007 % 0008 % return the size of <m> with respect to the first <numdims> dimensions. 0009 % the result is a vector of length <numdims>. 0010 % 0011 % example: 0012 % isequal(sizefull([1 2 3],3),[1 3 1]) 0013 0014 f = placematrix(ones(1,numdims),size(m),[1 1]);