This MATLAB function returns the sizes of each dimension of array X in a vector, d, with ndims(X) elements.If X is a scalar, then size(X) returns the vector [1 1].
www.mathworks.com