Problem 2861. Is the test point on the line segment?
Given the [x,y,z] coordinates for the three points pa, pb, and pc, return true if the test point pc is on the line segment with endpoints pa and pb.
pc is on the line segment if it lies at one of the end points.
Solution Stats
Problem Comments
-
2 Comments
Guillaume
on 22 Jan 2015
Your recent edit to the test suite broke it. You need a space or a comma between the two -1 in the definition of pa in the first test.
Brian Hannan
on 22 Jan 2015
Thanks, Guillaume. I just fixed the error.
Solution Comments
Show commentsProblem Recent Solvers19
Suggested Problems
-
1568 Solvers
-
Test if a Number is a Palindrome without using any String Operations
238 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2323 Solvers
-
Find Index of maximum Value and maximum Value of a vector
165 Solvers
-
MATCH THE STRINGS (2 CHAR) very easy
292 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!