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 the numeric mean of the prime numbers in a matrix.
6785 Solvers
Read a column of numbers and interpolate missing data
1235 Solvers
875 Solvers
Test if a Number is a Palindrome without using any String Operations
181 Solvers
Project Euler: Problem 9, Pythagorean numbers
283 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!