www.gusucode.com > smith圆图matlab源码程序 > smith/ss1.m
for x=1:5; r=1; u=(r.^2+x.^2-1)/(r.^2+2*r+1+x.^2); v=(2*x)/(r.^2+2*r+1+x.^2); tr=2*pi*(0:0.01:1); l=sqrt(u^2+v^2); plot(l*cos(tr),l*sin(tr),'b'); axis([-1,1,-1,1]); hold on end for r1=0:0.1:5 for rr=1/(1+r1); cr=1-rr; plot(cr+rr*cos(tr),rr*sin(tr),'m') hold on end end for xx=0.1:0.2:5; rx=1/xx;cx=rx; tx=2*atan(x)*(0:0.01:1); if tx<pi; plot(1-rx*sin(tx),cx-rx*cos(tx),'r') plot(1-rx*sin(tx),-(cx-rx*cos(tx)),'r') else plot(1-rx*sin(tx),-cx+rx*cos(tx),'r') plot(1-rx*sin(tx),-(-cx+rx*cos(tx)),'r') end hold on end