Problem 193. Smallest distance between a point and a rectangle
Solution Stats
Problem Comments
-
2 Comments
For the n dimensional case it would be better to say that x and y lie on opposite vertices of the n-hypercuboid such that each edge is parallel to a coordinate axis.
Two points do not define a rectangle. This is especially true in 3D space. A correct answer to this question would be 0 or the point closest to the circle defined by the two points on the diameter, depending on the rectangle you chose to make. (Every rectangle formed from two points defining opposite corners makes a circle, and in 3D, a sphere). I genuinely do not know how you want me to handle the 3D cases.
Solution Comments
Show commentsProblem Recent Solvers168
Suggested Problems
-
3031 Solvers
-
8020 Solvers
-
471 Solvers
-
Are all the three given point in the same line?
370 Solvers
-
239 Solvers
More from this Author38
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!