Extreme points finding from set

d = xlsread('FaceFour_TRAIN.xlsx')
s = d(1:1,2:end);
fa = movstd(s,20,1);
secarray = movstd(fa,20,1) ;
secidx = find(secarray>.04);
f = secarray(secidx);
[maxvals, maxidx] = maxk(f,14);
sidx = secidx(maxidx);
x = 1:length(s);
key=plot(x, s, 'b-', sidx, s(sidx), 'go')
here the maximum points are extracted and plotted.I need to check and find only the extreme points from this,how can I do this.Please help me.

13 comentarios

Geoff Hayes
Geoff Hayes el 18 de Sept. de 2019
Silpa - please clarify what you mean by extreme. Are these the minimum and maximum points, or something else?
Silpa K
Silpa K el 18 de Sept. de 2019
The graph is like a wave.I mean the highest points that coming in the wave crest and wave trough.
Silpa K
Silpa K el 18 de Sept. de 2019
The graph likeScreenshot (30).png
Rik
Rik el 19 de Sept. de 2019
I suggested findpeaks in your duplicate post.
Silpa K
Silpa K el 19 de Sept. de 2019
Sir Iam new to matlab.If I used findpeaks only the peaks are extracting.How can I find both peak points and all the mininimum troughs points.And that points I need to mark in the original graph.Please help me.
Thank you.
Rik
Rik el 19 de Sept. de 2019
There are probably better ways, but if you do this
findpeak(-data)
you will find the local minima.
And once you have x and y, you should be able to plot those points.
Silpa K
Silpa K el 19 de Sept. de 2019
Iam getting 1×0 empty double row vector when I use this.
Rik
Rik el 19 de Sept. de 2019
Without your data and your code I can do nothing to help you. Have you read the documentation? I suspect it may return an empty vector is none of your peaks satisfy the requirements. Use the optional arguments to relax the requirements.
Silpa K
Silpa K el 20 de Sept. de 2019
d = xlsread('FaceFour_TRAIN.xlsx')
s = d(1:1,2:end );
fa = movstd(s,20 );
secarray = movstd(fa,20 ) ;
sec = secarray(secarray>.04 );
k=maxk(sec,14)
peak points of k
darova
darova el 20 de Sept. de 2019
Why those points are not extreme?
21Untitled.png
Silpa K
Silpa K el 20 de Sept. de 2019
Sir,It is only a sample graph.I need to find all the extreme points(Present in the crust and trough)
darova
darova el 20 de Sept. de 2019
HOw you define "extreme" point? Where is it?
Silpa K
Silpa K el 20 de Sept. de 2019
The maximum peak points present in the crust and trough.If I use findpeaks(d),then iam not getting the answer.
1×0 empty double row vector is the output coming.

Iniciar sesión para comentar.

Respuestas (1)

Steven Lord
Steven Lord el 19 de Sept. de 2019

0 votos

I suspect some combination of islocalmin, islocalmax, and/or ischange will identify the points you've called out with + markers in your plot. All three of these functions were introduced as part of MATLAB in release R2017b.

Etiquetas

Preguntada:

el 18 de Sept. de 2019

Comentada:

el 20 de Sept. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by