I'm enjoying these creative solutions.
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. :-)
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.
829 Solvers
487 Solvers
Find the maximum number of decimal places in a set of numbers
740 Solvers
Create a vector whose elements depend on the previous element
391 Solvers
Write c^3 as sum of two squares a^2+b^2
281 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!