Effacer les filtres
Effacer les filtres

select/ extract only increasing part among both increasing and decreasing set of data

1 vue (au cours des 30 derniers jours)
I have a data set which initially increases and then decreases. I want to select/ extract only increasing part. How shall I do this?

Réponses (1)

Walter Roberson
Walter Roberson le 1 Mai 2019
locs = strfind([diff(DATA)<0,true], [0 1]) + 1;
DATA(1:locs(1))
The code was written like this to have protection for the case where the data is all ascending. You could also find(diff(DATA)<0,1) and test for isempty()
  1 commentaire
Heramb Gaikwad
Heramb Gaikwad le 1 Mai 2019
Thank you Sir for quick reply
Actually I got this command somewhere, which determine the peak value from this we can extract the data in increasing order
[peaks,idx]=findpeaks(A);

Connectez-vous pour commenter.

Catégories

En savoir plus sur NaNs dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by