Periodically repeating exponential function
Ältere Kommentare anzeigen
Hi! I am trying to design a trapezoidal filter in Matlab by generating a periodically decaying exponential signal that we get from the pre-amplifier. Can someone help me with the code to generate this type of periodic signal?
Akzeptierte Antwort
Weitere Antworten (1)
Scott Sands
am 10 Nov. 2018
Bearbeitet: madhan ravi
am 10 Nov. 2018
try using mod() rather than repmat for greater flexibility:
%setup:
Twave=50;
T=100;
Fs = 1;
dt = 1/Fs;
Time = (-T:dt:T-dt)';
tau=20;
%generate periodic exponential "v", scaled 0-1:
v = 1/(1-exp(-Twave/tau))*(1*exp(-mod(Time,Twave)/tau) - exp(-Twave/tau));
figure(1);
clf(1);
plot(Time,v);
Kategorien
Mehr zu Matched Filter and Ambiguity Function finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
