Code covered by the BSD License  

Highlights from
Get points for a line between 2 points

3.5

3.5 | 2 ratings Rate this file 13 Downloads (last 30 days) File Size: 1.21 KB File ID: #29104

Get points for a line between 2 points

by shaz

 

21 Oct 2010

You have 2 points, and you want N number of points between these 2 points.

| Watch this File

File Information
Description

You have 2 points, and you want N number of points between these 2 points. It's like making a line between 2 points. It takes start and end points, and the number of points you want in between.

Acknowledgements

This file inspired Sampling Of 2 D Geometrical Object Via Line Beams.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File  
Everyone's Tags
image processing(2), simulation(2)
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
05 Jul 2012 Suinn Park

In the source code,

if m == Inf "|| m == -Inf"

I think the latter condition (in quotation mark) is required for some case. Thanks!

26 Nov 2010 Michael Chan

Thank you, it is useful in certain applications.

21 Oct 2010 Sean de

This is basically just a wrapper for LINSPACE that does a whole bunch of unnecessary computations. It doesn't matter what the slope, m, is for this computation and it is computed and used to vary how LINSPACE is called. LINSPACE can be called with the same start and end point with a number of divisions and it will be the same as just replicating that number. The author didn't recognize this.

-Anything with four lower case Ls in a row is confusing.
-There is no help, no H1 line

I would also think that for something like this to be useful, it should work in nD space. I.e. start point and end point could be vectors of any dimension and it would output that many vectors corresponding to the line through n dimensions.

Contact us