linspace

Create a row vector with equally spaced elements.

Syntax

R = linspace(a,b)

R = linspace(a,b,n)

Inputs

a,b
Specify the interval [a, b].
Dimension: scalar
n
The number of elements to produce (default: 100).
Type: integer
Dimension: scalar

Outputs

R
The vector result.

Example

linspace(3,8,11)
ans = [Matrix] 1 x 11
3.00000  3.50000  4.00000  4.50000  5.00000  5.50000  6.00000  6.50000  7.00000  7.50000  8.00000