LOCAL_MAX finds positions and values of local max of x [p,a]=local_max(x) Tests: x=[[1:5],[4:-1:1],[1:4],[3:-1:1]],plot(x),[p,a]=local_max(x) x=[[1:5],[4:-1:1],[2:4],[3:-1:1],[2:3],[2:-1:1]],plot(x),[p,a]=local_max(x) See also LOCAL_MAXMIN Auteur : A. Djafari