Utilizing "maxk" function in series of vectors
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi. I used "findpeaks" function, and get peak datas in vector(pks, locs): "locs" means the X value.
And I wanna get 4 peak datas in vector in order to "locs" value like the loaded picture in red grid (in the range of 1<locs<10).
But according to the present code, I can only get seperate "maxk" values for each pks and locs.
How can I get desirable vector array like the picture?
for n=1:col-2
y=numbers(:,col);
ys=smooth(y,50,'sgolay',5);
[pks,locs] = findpeaks(ys,x,'MinPeakDistance',0.5);
A{n}=[pks,locs];
B{n}=maxk(A{n,1}(locs>1&locs<10,:),4);
end
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!