matlab one dimention size code example
Example: matlab matrix size
d = size(X) % Returns sizes of each dimension of array X in a vector d.
[m,n] = size(X) % Returns the size of matrix X in separate variables m and n.
m = size(X,dim) % Returns the size of the dimension of X specified by scalar dim.