This solution is outdated. To rescore this solution, sign in.
-
1 Comment
Amy
on 17 Jul 2012
Fails when the max value output should be negative and the last value of the input vector is zero, e.g. a = [5 4 -1 0 -2 0 -5 0]. Should return -1, but returns 0.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!