clear all close all figure(1) subplot(1,2,1) x=-1:0.01:1; y = sqrt(1 -x.^2); plot(x,y,'b',x,-y,'b') hold on plot(zeros(1,241),[-1.2:0.01:1.2],'b') plot([-1.2:0.01:1.2],zeros(1,241),'b') axis([-1.2 1.2 -1.2 1.2]) zgrid for k=1:10000 set(0,'Current',1) [re,im]= ginput(1); z1 = re + i*im; z2 = re - i*im; plot(re,im,'xr',re,-im,'xr') title('Plano z') if k>1 plot(re_ant1,im_ant1,'xb',re_ant1,-im_ant1,'xb') end re_ant1 = re; im_ant1 =im; n=[1 0]; d=conv([1 -z1],[1 -z2]); sd = sum(d); Gz = tf(sd*n,d,.1); % figure(2) figure(1) subplot(1,2,2) [y,t] = step(Gz); stairs(t,y); hold on grid on title('Resposta ao Degrau Unitário') Gs =d2c(Gz); p = pole(Gs); re = real(p(1)); im = imag(p(1)); % figure(1) % subplot(2,1,2) % title('Plano s') % grid on % hold on % plot(zeros(1,1001),[-50:0.1:50],'b') % plot([-50:0.1:50],zeros(1,1001),'b') % plot(re,im,'xr',re,-im,'xr') % if k>1 % plot(re_ant2,im_ant2,'xb',re_ant2,-im_ant2,'xb') % end % re_ant2 = re; % im_ant2 =im; end