It would be good if Cody penalized huge strings. :)
Solution uses regexprep with dynamic operators for the replacement expression which outsmarts Cody's size calculation.
This is just silly. It's gaming the Matlab grader, and not doing a particularly good job at that. Why should this stop at 3999?
Very nicely done.
Back to basics 12 - Input Arguments
525 Solvers
Back to basics 25 - Valid variable names
293 Solvers
Create a vector whose elements depend on the previous element
392 Solvers
find the maximum element of the matrix
349 Solvers
315 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!