Test case x=[11 22 132] will cause some solutions here to fail.
Great catch! Test case added; and by "some solutions" you mean "All solutions except yours and mine."
@ Tim
Well done, Tim. I noticed the bug of my solution, but it did work for the old test suit, and I was too lazy to fix the bug.
Find all elements less than 0 or greater than 10 and replace them with NaN
13269 Solvers
2218 Solvers
Increment a number, given its digits
566 Solvers
Back to basics 8 - Matrix Diagonals
793 Solvers
There are 10 types of people in the world
346 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!