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

📄 plus.m

📁 computation of conformal maps to polygonally bounded regions
💻 M
字号:
function r = plus(p,q)
%   Translate a polygon, or add the vertices of two polygons.

%   Copyright 1998-2003 by Toby Driscoll.
%   $Id: plus.m 245 2003-03-03 16:24:51Z driscoll $

if isa(q,'polygon')
  tmp = p;
  p = q;
  q = tmp;
end

switch(class(q))
 case 'polygon'
  if length(q)~=length(p)
    error('Polygons must have the same length to be added.')
  elseif isinf(p) || isinf(q)
    error('Only finite polygons may be added.')
  end
  r = polygon( vertex(p) + vertex(q) );
 case 'double'
  if length(q) > 1 && length(q)~=length(p)
    error(['Only a scalar or identical-length vector may be added to a ' ...
           'polygon.'])
  end
  r = polygon( vertex(p) + q(:) );
end

⌨️ 快捷键说明

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