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 Solvers169
Suggested Problems
-
Who has power to do everything in this world?
421 Solvers
-
Remove element(s) from cell array
1169 Solvers
-
313 Solvers
-
288 Solvers
-
Calculate Amount of Cake Frosting
20341 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!