-
2 Comments
Peter
on 10 Mar 2013
This solution gives the wrong value if the largest value is at the end of the vector. For example for x = [1 0 2 0 3] it returns 2 instead of 3.
Ned Gulley
on 12 Mar 2013
Thanks for the tip!
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!