calledit3.m

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

M
24
字号
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

⌨️ 快捷键说明

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