How can i write code for Peck Detection for DSP by using derivative??

2 次查看(过去 30 天)
How can I write the code to find out the peck detection for DSP by using the derivative function? I am a very beginner. So that I have faced some problems. I have tried to write but now how can I find out the plot for derivative function i.e. 1st,2nd,3rd
clc;
clear;
t=0:1/200:2;
signal=sin(5*pi*t)+cos(13*pi*t)+sin(16*pi*t);
plot(t,signal)
hold on;
for i=2:length(t)-1
if signal(i)>signal(i-1)
if signal(i)>signal(i+1)
plot(t(i),signal(i),'o')
end
end
end
diff(signal)
diff(signal, 2)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Neuroimaging 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by