Creates a linearly spaced array.
Syntax |
Description |
---|---|
x = linspace(min,max,num); |
x will be an array with num elements, linearly spaced between min and max. If num is set to 1, then x will be the average of min and max. |
Examples
?x=linspace(1,3,4); result: 1 1.66667 2.33333 3
Call linspace with num of 1. The result with be the average of min and max.
?linspace(1,2,1); result: 1.5
See Also
List of commands , : , end , []