HOW CAN I TIME SHIFT A SIGNAL (FOR EXAMPLE I HAVE GAUSSIAN PULSE AND I WANT TO SHIFT ITS PEAK 3ms IN TIME)
6 views (last 30 days)
Show older comments
Everyone just please help me with this question. I have a pulse signal
signal = exp(-((t.^2).*((f0)^2))./(Var_Sq));
just for now don't care what are var_sq, f0 and t. I just want to add a delay which is 3ms to this signal and observe its peak not on 0 index. but on the 3ms index. I have searched the answer of this simple question but nobody knows it.
As a note: (t-t0) is not working. Please give me a support.
0 Comments
Answers (1)
Mathieu NOE
on 2 Jan 2021
hi
see below
time shifting do actually work
I choose f0 fast enough so that a 3 ms delay is long compare to the pulse period
f0 = 2e3;
Var_Sq = 1;
Fs = 1e5;
dt = 1/Fs;
samples = 1e3;
t = dt*(0:samples-1);
offset = 300*dt; % 3 ms delay
signal1 = exp(-((t.^2).*((f0)^2))./(Var_Sq));
signal2 = exp(-(((t-offset).^2).*((f0)^2))./(Var_Sq));
figure(1),plot(t,signal1,'b',t,signal2,'r');grid
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!