findpeakslidersredraw.m
来自「A fast customizable function for locatin」· M 代码 · 共 15 行
M
15 行
% Redraws graph for FindPeakSliders when slider are moved.
global x
global y
global SlopeThreshold
global AmpThreshold
global SmoothWidth
global PeakWidth
global P
axes(h);
plot(x,y,'r') % Graph the signal in red
P=findpeaks(x,y,SlopeThreshold,AmpThreshold,SmoothWidth,PeakWidth);
title([num2str(max(P(:,1))) ' peaks detected'])
xlabel(['SlopeT = ' num2str(SlopeThreshold) ' AmpT = ' num2str(AmpThreshold) ' SmoothWidth = ' num2str(SmoothWidth) ' PeakWidth = ' num2str(PeakWidth) ])
text(P(:, 2),P(:, 3),num2str(P(:,1))) % Number the peaks found on the graph
axis([x(1) x(length(x)) -.1.*max(y) max(y)]); % Update plot
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?