MATLAB Function Reference Previous page   Next Page
linspace

Generate linearly spaced vectors

Syntax

Description

The linspace function generates linearly spaced vectors. It is similar to the colon operator ":", but gives direct control over the number of points.

y = linspace(a,b) generates a row vector y of 100 points linearly spaced between and including a and b.

y = linspace(a,b,n) generates a row vector y of n points linearly spaced between and including a and b.

See Also

logspace

The colon operator :


Previous page  linsolve listdlg Next page

© 1994-2005 The MathWorks, Inc.