Pulse train with multiple bandwidth
6 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Shubham Khatri
2021 年 4 月 20 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Waveform Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!