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

1 Ansicht (letzte 30 Tage)
Md. Najmul Mowla
Md. Najmul Mowla am 11 Dez. 2019
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)

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by