In high school we learn the line equation y = mx + c where m is the gradient and c is the intercept. However this form is problematic for vertical lines where m is infinite. A more powerful representation is the homogeneous form ax + by + c = 0 which can be represented by a 3-vector L = [a b c].
Given a pair of Cartesian points represented by 2-element column vectors P1 and P2 determine the equation of a homogeneous line of the form expressed as a 3-element row vector.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers14
Suggested Problems
-
Project Euler: Problem 10, Sum of Primes
2129 Solvers
-
2280 Solvers
-
Given a matrix, return the last eigen value
233 Solvers
-
157 Solvers
-
Find out value of sine given by degree.
357 Solvers
More from this Author16
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!