Problem 58956. Find the nine-point circle of a triangle
Solution Stats
Problem Comments
-
7 Comments
Sorting via x9 is not guaranteed to get results to match--points with the same x value but different y values can be flipped by roundoff errors in x.
OK, thanks. I think the new test will avoid that problem.
Has the test actually changed? Sorry to make extra work for you....
I thought I had changed it, but it wasn't changed. Now it is. Thanks again. I appreciate the feedback.
The new test didn't work for me, but the following seems like it might do the trick:
[~,indx]=sort(angle(complex(x9-x0,y9-y0)));
X9=x9(indx);
Y9=y9(indx);
[~,indx]=sort(angle(complex(x9_correct-x0,y9_correct-y0)));
x9_correct=x9_correct(indx);
y9_correct=y9_correct(indx);
OK, thanks Tim. I changed the test.
Thank you.
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
The Answer to Life, the Universe, and Everything
528 Solvers
-
Diophantine Equations (Inspired by Project Euler, problem 66)
63 Solvers
-
convert matrix to single column
408 Solvers
-
237 Solvers
-
Who is the baby and who is the daddy in this family?
49 Solvers
More from this Author281
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!