Pulse train with multiple bandwidth
조회 수: 2 (최근 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에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!