Periodically repeating exponential function
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Scott Sands
el 10 de Nov. de 2018
Editada: madhan ravi
el 10 de Nov. de 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);
Categorías
Más información sobre Matched Filter and Ambiguity Function en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
