powered by
Generate linearly spaced vectors.
linspace(a, b, n=100)
Returns vector containing containing n points linearly spaced between a and b inclusive. If \(\code{n} < 2\), the result will be the ending point b.
n
a
b
numeric scalar specifying starting point
numeric scalar specifying ending point
numeric scalar specifying number of points to be generated
P. Roebuck proebuck1701@gmail.com
Similar to colon operator but gives direct control over the number of points. Note also that although MATLAB doesn't specifically document this, the number of points generated is actually floor(n).
floor(n)
logspace
linspace(1, 10, 4)
Run the code above in your browser using DataLab