Problem 43642. Euclidean distance from a point to a polynomial
Solution Stats
Problem Comments
-
1 Comment
I'm enjoying these creative solutions.
Solution Comments
-
1 Comment
John, I just tried your file exchange solution out of pure curiosity. Your guess is correct; it does score poorly. I also got the error "You may not use the command(s) builtin in your code" for the test cases. All I did was change only the first line to call the function and the variable names with no other checking. I'll do some real work on it now. :-)
-
2 Comments
Will not solution like this be sooo much slower than simple loops?! Short yes, efficient no.
well, I think I was wrong...This solution is slower if the degree of the polynomial is small but much faster if the degree gets higher...solving polynomials of high degree is really slow with ROOTS.
Problem Recent Solvers24
Suggested Problems
-
Find the peak 3n+1 sequence value
1557 Solvers
-
Back to basics 22 - Rotate a matrix
827 Solvers
-
Back to basics 23 - Triangular matrix
743 Solvers
-
Back to basics - mean of corner elements of a matrix
333 Solvers
-
calculate PI without using pi function
67 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!