-
2 Comments
SMALLER than regexp?! I can think of a ton of problems this hack would work with. You may have unleashed a great evil upon the Cody with this answer...
I guess I was technically wrong too, as I'd seen both polyval and figure(YOU) used to solve problems before. So you solved it given (then) current technology. VERY nicely done!
Thanks, Brandon!
I don't think this'll be copied much in other solutions, actually. (Ab)use of regex() is a quick and cheap way to get a regular solution down to size 10; this, on the other hand, requires some thought.
Fun fact BTW: round() is only necessary here due to numerical inaccuracies. If floating point arithmetic was perfect this would work without rounding.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!