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

📄 fig4_7.m

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

fst=60;fsy=525;
deltat=1/fst;deltay=1/fsy;
clear H0 H;

ft=[-fst/2:fst/100:fst/2];lt=length(ft);
fy=[-fsy/2:fsy/100:fsy/2];ly=length(fy);

H0=zeros(lt,ly);
for (i=1:lt) 
   for (j=1:ly)
      if (ft(i)<0)&(ft(i)>-fst/2)
         if (fy(j)<fsy/fst*ft(i)+fsy/2)&(fy(j)>-fsy/fst*ft(i)-fsy/2)
            H0(i,j)=2;
         end;
   else
      if (ft(i)>=0)&(ft(i)<fst/2)
         if (fy(j)<-fsy/fst*ft(i)+fsy/2)&(fy(j)>fsy/fst*ft(i)-fsy/2)
            H0(i,j)=2;
         end;
      end;
   end;
end;
end;
figure;subplot(2,3,1),imagesc(H0');colormap(gray(256)); axis image; axis off;
%text(47,110,'-f_{s,y}/2');text(48,-10,'f_{s,y}/2');
%text(105,49,'f_{s,t}/2');text(-20,49,'-f_{s,t}/2');
%text(-5,110,'-f_{s,t}/2');text(95,110,'f_{s,t}/2');
%text(-10,0,'f_{s,y}/2');text(-10,100,'-f_{s,y}/2');
%print -deps2 ch4-deinterlace-a.eps

H=zeros(lt,ly);

for (i=1:lt) for (j=1:ly)
      H(i,j)=1+cos(2*pi*fy(j)*deltay);
   end;end;
subplot(2,3,2),imagesc(H');colormap(gray(256)); axis image; axis off;
%text(47,110,'-f_{s,y}/2');text(48,-10,'f_{s,y}/2');
%text(105,49,'f_{s,t}/2');text(-20,49,'-f_{s,t}/2');



for (i=1:lt) for (j=1:ly)
      H(i,j)=1+7/8*cos(2*pi*fy(j)*deltay)-1/8*cos(6*pi*fy(j)*deltay);
   end;end;
subplot(2,3,3),imagesc(H');colormap(gray(256)); axis image; axis off;
%text(47,110,'-f_{s,y}/2');text(48,-10,'f_{s,y}/2');
%text(105,49,'f_{s,t}/2');text(-20,49,'-f_{s,t}/2');

for (i=1:lt) for (j=1:ly)
      H(i,j)=sqrt((1+cos(2*pi*ft(i)*deltat))^2+(sin(2*pi*ft(i)*deltat))^2);
   end;end;
subplot(2,3,4),imagesc(H');colormap(gray(256)); axis image; axis off;
%text(47,110,'-f_{s,y}/2');text(48,-10,'f_{s,y}/2');
%text(105,49,'f_{s,t}/2');text(-20,49,'-f_{s,t}/2');

for (i=1:lt) for (j=1:ly)
      H(i,j)=1+cos(2*pi*ft(i)*deltat);
   end;end;
subplot(2,3,5),imagesc(H');colormap(gray(256)); axis image; axis off;
%text(47,110,'-f_{s,y}/2');text(48,-10,'f_{s,y}/2');
%text(105,49,'f_{s,t}/2');text(-20,49,'-f_{s,t}/2');



for (i=1:lt) for (j=1:ly)
      H(i,j)=1+(cos(2*pi*ft(i)*deltat)+cos(2*pi*fy(j)*deltay))/2;
   end;end;



subplot(2,3,6);imagesc(H');colormap(gray(256));axis image;axis off;
%text(47,110,'-f_{s,y}/2');text(48,-10,'f_{s,y}/2');
%text(105,49,'f_{s,t}/2');text(-20,49,'-f_{s,t}/2');

print -deps2 ch4-deinterlace-freq.eps

⌨️ 快捷键说明

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