Problem 51. Find the two most distant points
Solution Stats
Problem Comments
-
7 Comments
Show
4 older comments
Jean-Marie Sainthillier
on 19 Jul 2012
More easy that it seems.
Carl Witthoft
on 20 Nov 2015
You need to specify "Euclidean" distance :-)
Jerivington
on 6 Jun 2016
Good problem, not too hard but required thinking
Dima Panna
on 3 Jun 2019
Please add the next test :
p = [0,0;
2,1;
2,6;
1,6];
ix_correct = [1 3];
assert(isequal(mostDistant(p),ix_correct))
The solutions of the form:
[~,indx]=max(dist(p'));
unique(indx)
will fail, the last line will return an extra index [1,3,4] instead of just [1,3]
heart
on 8 Feb 2020
refer to
Convex Hull therom and the Graham's Scan method
Can Tekin
on 12 Jun 2020
+1
Peter
on 16 Aug 2023
Nice one!
Solution Comments
Show commentsProblem Recent Solvers2533
Suggested Problems
-
1879 Solvers
-
1253 Solvers
-
547 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
771 Solvers
-
3019 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!