⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 circint.m

📁 matlab 天线和电磁分析工具箱 matlab electromagnetic and anntena
💻 M
字号:
% circint.m - circle intersection on Gamma-plane
%
% Usage: Gamma = circint(c1,r1,c2,r2)
%
% c1,r1 = center and radius of circle 1
% c2,r2 = center and radius of circle 2
%
% Gamma = point of intersection of the two circles (two points)

% S. J. Orfanidis - 2000 - www.ece.rutgers.edu/~orfanidi/ewa

function Gamma = circint(c1,r1,c2,r2)

if nargin==0, help circint; return; end

th = acos((r1^2 + r2^2 - abs(c1-c2)^2)/(2*r1*r2)) * [1; -1];   % th = ph2-phi1

if ~isreal(th),
    fprintf('\nno intersection exists\n\n');
    return;
end

z1 = (c2 - c1) ./ (r1 - r2*exp(j*th));                         % z1 = exp(j*ph1)                   

Gamma = c1 + r1 * z1;

⌨️ 快捷键说明

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