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

📄 fig3_9.m

📁 these are the Mtlab functions to plot the figures in the book Communication system (by Haykin)
💻 M
字号:
%drawing the camera aperture function

%impulse response

clear imp;

fst=60; deltat=1/fst; deltae=deltat;
fsy=480; deltay=1/fsy; 
beta=fsy/2/sqrt(log(2));
sigma=1/2/beta/pi;
y=-2*deltay:deltay/10:2*deltay;
t=-deltae:deltae/10:2*deltae;
ly=length(y);lt=length(t);
for (iy=1:ly) for (it=1:lt)
      if (t(it)>=0)&(t(it)<=deltae)
         imp(iy,it)=1/deltae*exp(-(y(iy)^2)/2/sigma^2)/sqrt(2*pi)/sigma;
      else
         imp(iy,it)=0;
      end;
      
end;end;
figure;
%subplot(1,2,1)
mesh(t,y,imp);view(20,30);axis tight;
%text(0.04,0,0,'x')
%text(0.017,-6,-0.07,'t')
%text(-0.04,-6.,0.6,'h(x,0,t)')
text(0.04,0,-1000,'\fontsize{12} y')
text(0.01,-7e-3,-1000,'\fontsize{12} t')
text(-0.02,-4e-3,6e4,'\fontsize{12} h(y,t)')
print -deps2 ch3-camera-aperture1.eps

%spectrum

clear H;

fy=-2*fsy:fsy/10:2*fsy;
ft=-5*fst:fst/10:5*fst;
ly=length(fy);lt=length(ft);
for (iy=1:ly) for (it=1:lt)
      if (ft(it)~=0)
         H(iy,it)=exp(-(fy(iy)^2)/2/beta^2)*sin(pi*ft(it)*deltae)/pi/ft(it);
      else
         H(iy,it)=exp(-(fy(iy)^2)/2/beta^2)*deltae;
      end;
   end;end;
%subplot(1,2,2)
figure;
mesh(ft,fy,H); view(20,30); axis tight;
text(350,100,-5e-3,'f_y')
text(-50,-1000,-7e-3,'f_t')
text(-300,-1000,25e-3,'H(f_y,f_t)')
%zlabel('H(f_x,0,f_t)')
print -deps2 ch3-camera-aperture2.eps

⌨️ 快捷键说明

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