Pulse train with multiple bandwidth
4 views (last 30 days)
Show older comments
I want to generate the pulse train which consists of guasepulses with different bandwidth. Can anyone help me? This is the code that I have
warning('off')
clc
clear
fs = 1e6;
Tr=1*10^-3;
Trs = zeros(1, Tr*fs);
idxdelay=4;
bandwidth = 2:20000:62000;
multisignal = []; %initialize an empty array to contain the final multisignal
xi = zeros(1, idxdelay);
bandwidth = bandwidth(randperm(length(bandwidth)));
f=25*10^5;
fx= @(y,t) (1-cos(2*pi*f*t/y)).*sin(2*pi*f*t).*(t<(y/f));
for c=1:idxdelay
t=linspace(0,2*bandwidth(c)/f,500);
x =fx(bandwidth(c),t);
xi(c) = norm(x);
multisignal=[multisignal x Trs];
%figure(1),hold on;
end
plot(multisignal)
0 Comments
Answers (1)
Shubham Khatri
on 20 Apr 2021
Hi,
The function gauspuls can be used to generate Gaussian pulses. According to the script provided, you are generating sinusoidal pulses with varying bandwidth. Replacing the sinusoidal function with the Gaussian pulse function can generate a Gaussian pulse train. You can refer to the following code snippet for more information:
warning('off')
clc
clear
fs = 1e6;
Tr=1*10^-3;
Trs = zeros(1, Tr*fs);
idxdelay=4;
bandwidth = 2:20000:62000;
multisignal = []; %initialize an empty array to contain the final multisignal
xi = zeros(1, idxdelay);
bandwidth = bandwidth(randperm(length(bandwidth)));
f=25*10^5;
frac_bandwidth = bandwidth/f;
for c=1:idxdelay
t=linspace(0,2*bandwidth(c)/f,500);
x = gauspuls(t,f,frac_bandwidth(c));
xi(c) = norm(x);
multisignal=[multisignal x Trs];
%figure(1),hold on;
end
plot(multisignal)
Hope this helps!
0 Comments
See Also
Categories
Find more on Downloads in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!