calledit2.m

来自「smith圆图」· M 代码 · 共 29 行

M
29
字号
function calledit2(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);
plot(double(x1),double(y1),'ok')
disp(double(x1));
disp(double(y1))
hold on

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);

for rr=1/(1+m);cr=1-rr;
  plot(cr+rr*cos(tr),rr*sin(tr),'r');
end
for x=n;
    rx=1/x;cx=rx;
    tx=2*atan(x)*(0:0.01:1);
    if tx<pi;
   plot(1-rx*sin(tx),cx-rx*cos(tx),'m')
    else
   plot(1-rx*sin(tx),-cx+rx*cos(tx),'m')
   axis([-1,1,-1,1])
    end
end
hold off

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?