function plot17(L,zl1u,pzona,pd,subpd,faltam,cfaltam,proteccion,elemento,Rfm,Rgm,k0) % DATOS %L=100; %zl1u=0.16+0.42i; %pzona=0.8; %pd=zeros(1,10); %pd=[14+6i 16+10i 18+15i 19+18i 21+23i 22+27i 24+31i 26+35i 27+40i 29+44i]; % CIRCULO MHO zl1=zl1u*L; zl1pzona=zl1*pzona; centro=zl1pzona/2; recentro=real(centro); imcentro=imag(centro); radio=sqrt(recentro^2+imcentro^2); extizq=recentro-radio; extder=recentro+radio; intervaloX=extder-extizq; incrementoX=intervaloX/100; X=zeros(1,101); Y1=zeros(1,101); Y2=zeros(1,101); X(1)=extizq; Y1(1)=imcentro; Y2(1)=imcentro; for n=2:100 X(n)=X(n-1)+incrementoX; Y1(n)=imcentro+sqrt(radio^2-(X(n)-recentro)^2); Y2(n)=imcentro-sqrt(radio^2-(X(n)-recentro)^2); end X(101)=extder; Y1(101)=imcentro; Y2(101)=imcentro; Xreves=X(:,101:-1:1); XX=zeros(1,202); XX=[X Xreves]; Y2reves=Y2(:,101:-1:1); Y1Y2=zeros(1,202); Y1Y2=[Y1 Y2reves]; plot(XX,Y1Y2,'g') axis('equal') grid xlabel('R') ylabel('X') % LINEA hold on rezl1=real(zl1); imzl1=imag(zl1); incrX3=rezl1/10; X3=zeros(1,11); Y3=zeros(1,11); X3(1)=0; Y3(1)=0; factor=imzl1/rezl1; for m=2:10 X3(m)=X3(m-1)+incrX3; Y3(m)=X3(m)*factor; end X3(11)=rezl1; Y3(11)=imzl1; plot(X3,Y3,'b') hold off % LINEA CON ASTERISCOS X4=zeros(1,11); Y4=zeros(1,11); incrX4=rezl1/10; X4(1)=0; Y4(1)=0; for s=2:10 X4(s)=X4(s-1)+incrX4; Y4(s)=X4(s)*factor; end X4(11)=rezl1; Y4(11)=imzl1; hold on plot(X4,Y4,'b*') if proteccion=='Sm' t=text(X4(1)+3,Y4(1),'S'); set(t,'Color',[0 0 1]) elseif proteccion=='Rm' t=text(X4(1)+3,Y4(1),'R'); set(t,'Color',[0 0 1]) end w=text(X4(2)+3,Y4(2),'0.1'); set(w,'Color',[0 0 1]) u=text(X4(6)+3,Y4(6),'0.5'); set(u,'Color',[0 0 1]) x=text(X4(10)+3,Y4(10),'0.9'); set(x,'Color',[0 0 1]) if proteccion=='Sm' t=text(X4(11)+3,Y4(11),'R'); set(t,'Color',[0 0 1]) elseif proteccion=='Rm' t=text(X4(11)+3,Y4(11),'S'); set(t,'Color',[0 0 1]) end hold off %------------------------------------------------------------------------------ % REPRESENTAR LA MEDIDA DE LA PROTECCION hold on plot(pd,'r') plot(subpd,'r*') x1=text(real(subpd(1))+3,imag(subpd(1)),'0.1'); set(x1,'Color',[1 0 0]) x2=text(real(subpd(5))+3,imag(subpd(5)),'0.5'); set(x2,'Color',[1 0 0]) x3=text(real(subpd(9)),imag(subpd(9))-10,'0.9'); set(x3,'Color',[1 0 0]) hold off %TITULO******************************************* %if faltam==7 % cadena=sprintf('Proteccion:%s Falta:%s ; Elemento:%s ; Rf=%3.1f ; Rg=%3.1f',proteccion,cfaltam,elemento,Rfm,Rgm); % title(cadena) %elseif faltam==8 % cadena=sprintf('Proteccion:%s Falta:%s ; Elemento:%s ; Rf=%3.1f ; Rg=%3.1f',proteccion,cfaltam,elemento,Rfm,Rgm); % title(cadena) %elseif faltam==9 % cadena=sprintf('Proteccion:%s Falta:%s ; Elemento:%s ; Rf=%3.1f ; Rg=%3.1f',proteccion,cfaltam,elemento,Rfm,Rgm); % title(cadena) %elseif faltam==11 % cadena=sprintf('Proteccion:%s Falta:%s ; Elemento:%s ; Rf=%3.1f ; Rg=%3.1f',proteccion,cfaltam,elemento,Rfm,Rgm); % title(cadena) %else % cadena=sprintf('Proteccion:%s Falta:%s ; Elemento:%s ; Rf=%3.1f ',proteccion,cfaltam,elemento,Rfm); % title(cadena) %end %FIN TITULO************************************** cadena1=sprintf('k0=%3.1f',k0); %a=sprintf('*'); %cadena=sprintf('Falta:%s ; Elemento:%s ; Rf=%3.1f ; Rg=%3.1f',cfaltam,elemento,Rfm,Rgm); %title(cadena) legend('Mho','Linea','m=0,0.1,...,1',cadena1,'m=0.1,...,0.9')