| MATLAB Function Reference | Search  Help Desk |
| linspace | See Also |
Generate linearly spaced vectors
yThe=linspace(a,b) y=linspace(a,b,n)
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 a and b.
y = linspace(a,b,n)
generates n points.
: (Colon) Create vectors, matrix subscripting, and for iterations
logspace Generate logarithmically spaced vectors