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

2 vues (au cours des 30 derniers jours)
Vishnu Dhakad
Vishnu Dhakad le 1 Juil 2019
Modifié(e) : Matt J le 1 Juil 2019
I dont have signal processing toolbox in my matlab package so I cant use findpekas.

Réponse acceptée

Matt J
Matt J le 1 Juil 2019
Modifié(e) : Matt J le 1 Juil 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 commentaires
Vishnu Dhakad
Vishnu Dhakad le 1 Juil 2019
Thanks its working
I want location also.
Matt J
Matt J le 1 Juil 2019
The code I gave you does give the location.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by