Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
sample points between coordinates

Subject: sample points between coordinates

From: audley james

Date: 25 Jan, 2011 02:03:04

Message: 1 of 2

Good day everyone,

I have two coordinates of a 2D line:

A = (200,400)
B = (600, 500)

How can I go about sampling points evenly on this line in Matlab ?

cheers
audley james.

Subject: sample points between coordinates

From: Think blue, count two.

Date: 25 Jan, 2011 02:09:28

Message: 2 of 2

On 24/01/11 8:03 PM, audley james wrote:
> Good day everyone,
>
> I have two coordinates of a 2D line:
>
> A = (200,400)
> B = (600, 500)
>
> How can I go about sampling points evenly on this line in Matlab ?

n = 35; %for example
xy = [linspace(A(1),B(1),n); linspace(A(2),B(2),n)];

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us