⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 problem_2_10.m

📁 Ultra.Wideband.Signals.and.Systems.in.Communication.Engineering.eBook-kB代码
💻 M
字号:
clear all
tau=12e-10;
f_1=3.6e9;f_2=4e9;f_3=4.4e9;f_4=4.8e9;f_5=5.2e9;f_6=5.6e9;f_7=6e9;f_8=6.4e9;f_9=7.6e9;f_10=8e9;
E=1;
K=sqrt(E/tau/sqrt(pi/2));
it=0;
for t=-2e-9:1e-12:2e-9;
    it=it+1;
    s_1(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_1*t);s_2(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_2*t);
    s_3(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_3*t);s_4(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_4*t);
    s_5(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_5*t);s_6(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_6*t);
    s_7(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_7*t);s_8(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_8*t);
    s_9(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_9*t);s_10(it)=sqrt(2)*K*exp(-t^2/tau^2)*cos(2*pi*f_10*t);
    s(it)=s_1(it)+s_2(it)+s_3(it)+s_4(it)+s_5(it)+s_6(it)+s_7(it)+s_8(it)+s_9(it)+s_10(it);
end,
figure (1);t=-2e-9:1e-12:2e-9;plot(t,s,'b');
xlabel('Time, sec');ylabel('Amplitude');grid;

iif=0;
for f=0:1e6:2e10;
    iif=iif+1;
    S_1(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_1))^2);S_2(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_2))^2);
    S_3(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_3))^2);S_4(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_4))^2);
    S_5(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_5))^2);S_6(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_6))^2);
    S_7(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_7))^2);S_8(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_8))^2);
    S_9(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_9))^2);S_10(iif)=sqrt(2)*.5*K*tau*sqrt(pi)*exp(-(pi*tau*(f-f_10))^2);
    S(iif)=S_1(iif)+S_2(iif)+S_3(iif)+S_4(iif)+S_5(iif)+S_6(iif)+S_7(iif)+S_8(iif)+S_9(iif)+S_10(iif);
end,
figure (3);f=0:1e6:2e10;plot(f,S,'r')
xlabel('Frequency, Hz');ylabel('Magnitude');grid;


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -