Problem 51. Find the two most distant points
Solution Stats
Problem Comments
-
6 Comments
Show
3 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
Solution Comments
Show commentsProblem Recent Solvers2496
Suggested Problems
-
Remove the polynomials that have positive real elements of their roots.
1412 Solvers
-
Flip the main diagonal of a matrix
758 Solvers
-
442 Solvers
-
289 Solvers
-
762 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!