How to find maxima and minima of a column matrix without using findpeaks ?

2 views (last 30 days)
I dont have signal processing toolbox in my matlab package so I cant use findpekas.

Accepted Answer

Matt J
Matt J on 1 Jul 2019
Edited: Matt J on 1 Jul 2019
d=conv( [A(1); A(:); A(end)], [1 ;-2 ;1], 'valid');
saddles=find(d==0)
maxs=find(d>0)
mins=find(d<0)
  5 Comments

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!