MATLAB Function Reference Previous page   Next Page
length

Length of vector

Syntax

Description

The statement length(X) is equivalent to max(size(X)) for nonempty arrays and 0 for empty arrays.

n = length(X) returns the size of the longest dimension of X. If X is a vector, this is the same as its length.

Examples

See Also

ndims, size


Previous page  legendre license Next page

© 1994-2005 The MathWorks, Inc.