This looks much (c)leaner than the REGEXP method.
while on the topic of 'undocumented trivia that will earn you a couple of cody points for no good reason', have you seen this one?
I believe this is the very first use of the Ans Hack in Cody. See http://blogs.mathworks.com/community/2016/06/23/the-great-ans-hack/
interesting use of strread to turn a string into a cell array (though probably only really useful in cody)
Kids, don't try this at home. :-)
This solution was proposed by Oleg Komarov.
1888 Solvers
Back to basics 18 - justification
178 Solvers
Generate N equally spaced intervals between -L and L
570 Solvers
259 Solvers
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
533 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!