- compute slope between the two points
- choose the number of points beteween and including the end points (see nPoints variable).
- Given the slope, and point P_1, compute the coordaintes at equally spaced intervals in the direction of P_2.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/324028/image.png)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!