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
Geoff Hayes
2019년 9월 18일
Silpa - please clarify what you mean by extreme. Are these the minimum and maximum points, or something else?
Silpa K
2019년 9월 18일
Silpa K
2019년 9월 18일
Rik
2019년 9월 19일
Silpa K
2019년 9월 19일
Rik
2019년 9월 19일
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
2019년 9월 19일
Rik
2019년 9월 19일
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
2019년 9월 20일
darova
2019년 9월 20일
Why those points are not extreme?

Silpa K
2019년 9월 20일
darova
2019년 9월 20일
HOw you define "extreme" point? Where is it?
Silpa K
2019년 9월 20일
답변 (1개)
Steven Lord
2019년 9월 19일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!.png)
