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:
How can I find the intersection of two lines in Matlab

Subject: How can I find the intersection of two lines in Matlab

From: Tran Quang Dat

Date: 8 Dec, 2011 06:49:08

Message: 1 of 2

Hello,
I have two equation of a straight lines as: y = ax + b and y = cx + d.
Now, how can I find the intersection of these lines in Matlab?
Thanks,
Tran Quang Dat

Subject: How can I find the intersection of two lines in Matlab

From: Roger Stafford

Date: 8 Dec, 2011 07:39:08

Message: 2 of 2

"Tran Quang Dat" wrote in message <jbpml4$huu$1@newscl01ah.mathworks.com>...
> I have two equation of a straight lines as: y = ax + b and y = cx + d.
> Now, how can I find the intersection of these lines in Matlab?
- - - - - - -
 p = [b,d]/[-a,-c;1,1]; % p = [x,y]

Roger Stafford

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