cd v:\cursos\pos\otimiza\aulas type extrator.m a=129.98; b=4000; c=0.5; d=25; [X1,X2]=meshgrid(0.0001:0.001:0.035,0.0001:0.001:0.025); L=a-b*X2-c./X1-d*X1./X2; x1=[0.0001:0.001:0.035]'; x2=[0.0001:0.001:0.025]'; r1=0.02*ones(21,1); r2=1e-4*ones(21,1); % 1e-4 (e nao zero) para aparecer na figura cs=contour(x1,x2,L,[0 5 10 15 18]);... xlabel('X1');... ylabel('X2');... clabel(cs);... hold on;... plot(x1(1:21),r2,'b:');... plot(r1,x2(1:21),'b:');... plot(x1(1:21),x2(1:21),'b:');... figure(gcf);... hold off; % cinvert extrator edit extrator disp(sprintf('%d',feature('SessionTool'))) 0 ; dbstatus dbstack dbstack ; disp(which('extrator')); v:\cursos\pos\otimiza\aulas\EXTRATOR.M mdbstatus 'v:\cursos\pos\otimiza\aulas\extrator.m' eval( 'if exist(''X1'',''var''), mauifunc(X1), end', ''); 25x35 double array disp(which('extrator')); v:\cursos\pos\otimiza\aulas\EXTRATOR.M clear 'v:\cursos\pos\otimiza\aulas\extrator.m' eval( 'if exist(''meshgrid'',''var''), mauifunc(meshgrid), end', ''); eval( 'if exist(''aparecer'',''var''), mauifunc(aparecer), end', ''); extrator H=rand(2) H = 0.9501 0.6068 0.2311 0.4860 eig(H) ans = 1.1586 0.2775 [0.1 -0.1]*H*[0.1 -0.1]' ans = 0.0060 H=rand(2) H = 0.8913 0.4565 0.7621 0.0185 eig(H) ans = 1.1886 -0.2788 [0.1 -0.1]*H*[0.1 -0.1]' ans = -0.0031 [0.1 0.1]*H*[0.1 0.1]' ans = 0.0213 H=rand(3) H = 0.8214 0.7919 0.1763 0.4447 0.9218 0.4057 0.6154 0.7382 0.9355 [V,L]=eig(H) V = 0.4907 -0.5599 - 0.5958i -0.5599 + 0.5958i 0.5135 0.2821 + 0.2144i 0.2821 - 0.2144i 0.7039 0.2246 + 0.3945i 0.2246 - 0.3945i L = 1.9030 0 0 0 0.3879 + 0.0339i 0 0 0 0.3879 - 0.0339i H=0.5*(H+H') H = 0.8214 0.6183 0.3958 0.6183 0.9218 0.5720 0.3958 0.5720 0.9355 [V,L]=eig(H) V = 0.5988 -0.5936 0.5377 -0.7532 -0.1892 0.6300 0.2722 0.7822 0.5604 L = 0.2236 0 0 0 0.4968 0 0 0 1.9583 H*V(:,1) ans = 0.1339 -0.1684 0.0609 V(:,1)*L(1,1) ans = 0.1339 -0.1684 0.0609 H H = 0.8214 0.6183 0.3958 0.6183 0.9218 0.5720 0.3958 0.5720 0.9355 V*L*inv(V) ans = 0.8214 0.6183 0.3958 0.6183 0.9218 0.5720 0.3958 0.5720 0.9355