www.gusucode.com > smith圆图matlab源码程序 > smith/calledit1.m

    for x=-1:0.5:2;
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),'w'); axis([-1,1,-1,1]);
hold on
end
for r1=0:0.1:3
for rr=1/(1+r1);
    cr=1-rr;
    tr=2*pi*(0:0.01:1);
    plot(cr+rr*cos(tr),rr*sin(tr),'y')
    hold on
end
end
for xx=0.1:0.2:5;
        rx=1/xx;cx=rx;
        tx=2*atan(xx)*(0:0.01:1);
        if tx<pi;
            plot(1-rx*sin(tx),cx-rx*cos(tx),'c')
            plot(1-rx*sin(tx),-(cx-rx*cos(tx)),'c')
        else
            plot(1-rx*sin(tx),-cx+rx*cos(tx),'c')    
            plot(1-rx*sin(tx),-(-cx+rx*cos(tx)),'c')  
        end
        hold on
    end
axis([-1,1,-1,1]);axis square;
plot(0,0,'xk')
hold on;