www.gusucode.com > smith圆图matlab源码程序 > smith/calledit3.m
function calledit3(h_edit1,h_edit2) m=str2double(get(h_edit1,'string')); n=str2double(get(h_edit2,'string')); x1=(m^2-1+n^2)/(m^2+2*m+1+n^2); y1=2*n/(m^2+2*m+1+n^2); U=(m.^2+n.^2-1)./(m.^2+2.*m+1+n.^2); V=(2*n)./(m.^2+2*m+1+n.^2); tr=2*pi*( 0:0.01:1) ; L=sqrt(U.^2+V.^2); hold on plot(L.*cos(tr),L.*sin(tr),'b'); if x1>=0 x4=0:0.01:x1; y4=y1/x1*x4; hold on plot(x4,y4,'b'); end if x1<0 x4=x1:0.01:0; y4=y1/x1*x4; hold on plot(x4,y4,'b'); end