fig73.m

来自「realize analysis and design for computer」· M 代码 · 共 34 行

M
34
字号
% Generates Fig 7.3% Computer Controlled Systems (3rd ed)% Author: B. Wittenmark% Last edit: 1997-07-05% Copyright (c) 1996 by K. J. 舠tr鰉, B. Wittenmark and% Department of Automatic Control, Lund Institute of% Technology, Lund, Swedennewplot;set(gcf,'PaperUnits','centimeters','PaperPosition',[2 2 13 10])set(gcf,'Units','centimeters','position',get(gcf,'PaperPosition'))lw=0.9;h=1;eps=0.001;n=500;dt=30/n;imp=zeros(1,n+1);t=zeros(1,n+1);for i=1:n+1  t(i)=-15+dt*(i-1);  if abs(pi*t(i)/h)<eps imp(i)=1; else imp(i)=sin(pi*t(i)/h)/(pi*t(i)/h);end;  end;%clf;subplot(3,1,1);plot(t,imp,'k-','Linew',lw)%title(['Fig 7.3 Shannon reconstruction']);axis([-15,15,-0.4,1.2]);set(gca,'Fontsize',9,'Fontname','NewCenturySchlbk');set(gca,'xtick',[-10 0 10]);set(gca,'ytick',[0 1]);xlabel('Time','Fontsize',9,'Fontname','NewCenturySchlbk');

⌨️ 快捷键说明

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