Find peak and plot graph from peak
조회 수: 2 (최근 30일)
이전 댓글 표시
At first , Im new here so how can I plot the peak from my data
댓글 수: 2
채택된 답변
Star Strider
2021년 2월 26일
I am not certain what you want to do.
If you want to get the peaks and their indices, request those outputs:
[pks,locs] = findpeaks(pure_brain(:,2)); % Get Peaks (‘pks’) and Peak Indices (‘locs’)
I have no idea what is in your data file, however if you want to plot them and indicate them, try this:
x = 1:size(pure_brain,1);
figure
plot(x, pure_brain(:,2))
hold on
plot(x(locs), pure_brain(locs,2), '^r')
hold off
grid
.
댓글 수: 5
Star Strider
2021년 2월 26일
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!