MATLAB Function Reference
  Go to function:
    Search    Help Desk 
length    Examples   See Also

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       Number of array dimensions

size        Array dimensions



[ Previous | Help Desk | Next ]