linspace( ) command or function creates a row vector with elements that are linearly (equally) spaced, after reading this MATLAB linspace topic, you will know the theory and examples.
Syntax:
linspace(xf,xl,n)
- xf is the first element of the row vector.
- xl is the last element of the row vector.
- n is the number of elements in the row vector.
Example: To create the row vector having equally spaced elements.
linspace(0,8,6)
Output:
ans =
0 1.6000 3.2000 4.8000 6.4000 8.0000
Related Topics
MATLAB lengthlength() command or function gives the number of elements in a vector or length of…
MATLAB onesThis command creates an array of all ones, after reading this MATLAB ones topic, you…
MATLAB xlabelThe xlabel command put the label on the x-axis of the plot, after reading this…
MATLAB ylabelThe ylabel command put the label on the y-axis of the plot, after reading this…
MATLAB titletitle() command puts the title on the plot, after reading this MATLAB title topic, you will…