How to time shift a signal
Show older comments
Hi,
I have this code,
clear all; close all; clc;
fc=30e3;
for n=1:3;
tc = gauspuls('cutoff',fc,0.4,[],-40);
t = -tc : 1e-7 : tc;
yi = gauspuls(t,fc,0.6);
plot(t,yi)
hold on
fc=fc+10e3;
end
It is supposed to generate 3 gaussian pulses each at 30kHz, 40kHz and 50kHz respectively. However they overlap each other and I want them to be time shifted in such a way that first is 30k then 40k and then 50k.
Thanks
Accepted Answer
More Answers (2)
Youssef Khmou
on 20 May 2013
hi, try :
clear all; close all; clc;
fc=30e3;
for n=1:3
tc = gauspuls('cutoff',fc,0.4,[],-40);
t = -tc : 1e-7 : tc;
yi = gauspuls(t+n*1e-5,fc,0.6);
plot(t,yi)
hold on
fc=fc+10e3;
end
Sk Group
on 27 Oct 2021
0 votes
For detailed post and complete code visit: https://www.swebllc.com/time-shifting-in-matlab-code-output/
Categories
Find more on Waveform Generation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!