plot(-abs(Gamma2)*cos(angle2),-abs(Gamma2)*sin(angle2),'rp'); Re3=[0,cos(angle2)]; Re4=[0,cos(angle2)]; Im3=[0,sin(angle2)]; Im4=[0,-sin(angle2)]; plot(-Re3,Im3,'r'); plot(-Re4,Im4,'r'); hold off; end else
angle1=abs(atan2(imag(Gamma2),real(Gamma2))); angle2=2*pi*(d1/0.5)+angle1-2*pi; if angle2<0
angle2=2*pi+angle2;
plot(-abs(Gamma2)*cos(angle2),abs(Gamma2)*sin(angle2),'rp');
plot(-abs(Gamma2)*cos(angle2),-abs(Gamma2)*sin(angle2),'rp'); Re3=[0,cos(angle2)]; Re4=[0,cos(angle2)]; Im3=[0,sin(angle2)]; Im4=[0,-sin(angle2)]; plot(-Re3,Im3,'r'); plot(-Re4,Im4,'r'); hold off; else
angle2=angle2;
plot(-abs(Gamma2)*cos(angle2),abs(Gamma2)*sin(angle2),'rp');
plot(-abs(Gamma2)*cos(angle2),-abs(Gamma2)*sin(angle2),'rp'); Re3=[0,cos(angle2)]; Re4=[0,cos(angle2)]; Im3=[0,sin(angle2)]; Im4=[0,-sin(angle2)]; plot(-Re3,Im3,'r'); plot(-Re4,Im4,'r'); hold off; end end end
hold off;
rho=(1+abs(Gamma2))/(1-abs(Gamma2));
if R0==Zo
set(handles.Ht5,'string',strcat('在d1 = ',num2str(d1),'λ处并接入Lo = ',num2str(Lo1),'λ 的短路支节可实现匹配'),'fontname','宋体','fontsize',10);
set(handles.Ht6,'string',strcat('或在d2 = ',num2str(d2),'λ处并接入Ls = ',num2str(Ls1),'λ 的开路支节实现匹配'),'fontname','宋体','fontsize',10); else
set(handles.Ht5,'string',strcat('在d1 = ',num2str(d1),'λ处并接入长度为Ls = ',num2str(Ls1),'λ 的短路支节','或Lo = ',num2str(Lo1),'λ 的开路支节可实现匹配'),'fontname','宋体','fontsize',10);
set(handles.Ht6,'string',strcat('或在d2 = ',num2str(d2),'λ处并接入长度为Ls = ',num2str(Ls2),'λ 的短路支节','或Lo = ',num2str(Lo2),'λ 的开路支节可实现匹配'),'fontname','宋体','fontsize',10); end
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton13.
function pushbutton13_Callback(hObject, eventdata, handles) % hObject handle to pushbutton13 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) R0= get(handles.R ,'string');%提取电阻电抗值 X0 = get(handles.X ,'string'); Zo= get(handles.Zo ,'string'); R0=str2double(R0);%格式转换 转换为数值 X0=str2double(X0); Zo=str2double(Zo); Z=R0+i*X0; Y=1/Z; Yo=1/Zo; G=real(Y); B=imag(Y); m=1;
%两支节相距λ/8
m1=(1+m^2)*G*Yo-G^2*m^2; m2=abs(1+m^2)*G*Yo-G^2*m^2; B11=-B+(Yo+sqrt(m1))/m;
B21=(Yo*sqrt(m2)+G*Yo)/(G*m); B12=-B+(Yo-sqrt(m1))/m;
B22=(-Yo*sqrt(m2)+G*Yo)/(G*m); Ls=-(atan(Yo/B11))/(2*pi); if Ls>=0
Ls11=Ls; else
Ls11=0.5+Ls; end
Ls=-(atan(Yo/B21))/(2*pi); if Ls>=0
Ls21=Ls; else
Ls21=0.5+Ls; end
Ls=-(atan(Yo/B12))/(2*pi); if Ls>=0
Ls12=Ls; else
Ls12=0.5+Ls; end
Ls=-(atan(Yo/B22))/(2*pi); if Ls>=0
Ls22=Ls; else
Ls22=0.5+Ls; end
hold off; r=R0/Zo; x=X0/Zo; z=r+i*x; y=1/z;
g=real(y); b=imag(y);
Gamma2=(z-1)/(z+1); Mod=abs(Gamma2); Phi=angle(Gamma2);
Lambda=(pi-Phi)/(4*pi); Alpha=(y-1)/(y+1);
plot(real(Alpha),imag(Alpha),'gp');
hold on;
plot(real(Gamma2),imag(Gamma2),'gp'); hold on;
aa=[real(Alpha),real(Gamma2)]; bb=[imag(Alpha),imag(Gamma2)]; polyfit(aa,bb,1); plot(aa,bb,'g'); hold on; if X0<0
if(Phi>=0)
Lmin=Phi/(4*pi); Lmax=0.25+Lmin; else
Lmin=(pi+Phi)/(4*pi); Lmax=0.25+Lmin; end else
if(Phi>=0)
Lmax=Phi/(4*pi); Lmin=0.25+Lmax; else
Lmax=(pi+Phi)/(4*pi); Lmin=0.25+Lmax; end end
%画出单位圆和标出电刻度 t=0:0.0001:2*pi;
plot(cos(t),sin(t),'--g');
text (-1.2,0,'0', 'fontname', 'arial','color','b', 'fonta', 'italic');
text (-0.1,1.03,'0. 125', 'fontname', 'arial','color','b', 'fonta', 'italic');
text (1.03,0,'0.25', 'fontname', 'arial','color','b', 'fonta', 'italic'); text (-0.1, -1.18, '0.375', 'fontname', 'arial','color','b', 'fonta', 'italic'); hold on;
plot([-1,1],[0,0],'g'); hold on;
plot([0,0],[-1,1],'g'); hold on;
axis('equal',[-1,1,-1,1]); %画出等G圆 if g==inf
plot(1,0,'rp');
axis('equal',[-1,1,-1,1]); else
a=g/(1+g); g1=1/(1+g);
plot((g1*cos(t)+a),(g1*sin(t)),'r'); axis('equal',[-1,1,-1,1]); hold on; end;
%画出等B圆 if b==inf
plot(1,0,'rp');
axis('equal',[-1,1,-1,1]); elseif b==0
plot([-1,1],[0,0],'r'); axis('equal',[-1,1,-1,1]); else
b1=1/b; r2=1/b;
plot((r2*cos(t)+1),(r2*sin(t)+b1),'m'); axis('equal',[-1,1,-1,1]); hold on; end;
%画出等反射圆和匹配圆 y=g+j*b;
gamma=(y-1)/(y+1); Mod=abs(gamma); Phi=angle(gamma);
plot(Mod*cos(t),Mod*sin(t),'b'); hold on;
axis('equal',[-1,1,-1,1]);
plot(0.5*(cos(t)+1),(0.5*sin(t)),'c'); hold off; hold on;
if imag(Ls11)==0 & imag(Ls12)==0 imag(Ls22)==0
t=0:0.0001:2*pi;
plot(0.5*(cos(t)),(0.5*sin(t)+0.5),'c'); hold on; r=R/Zo; x=X/Zo; z=r+i*x; y=1/z;
g=real(y);
imag(Ls21)==0 & &