Section: Array Generation and Manipulations
isscalar
x = isscalar(y)
and it returns a logical 1 if the argument is a scalar, and a logical 0 otherwise.