This problem is hard due the precision error that floating-point numbers have. The number 0.1 may not be equal to 0.1, be careful.
i am surprised to see why the same thing doesn't work when kept in decimal
middleAsColumn: Return all but first and last element as a column vector
393 Solvers
Longest run of consecutive numbers
1800 Solvers
311 Solvers
540 Solvers
379 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!