double.m

来自「computation of conformal maps to polygon」· M 代码 · 共 17 行

M
17
字号
function x = double(p)
%DOUBLE Convert polygon to double.
%   If the polygon is bounded, DOUBLE returns the vertices in an Nx2
%   matrix. Otherwise, it returns a cell array whose first component is
%   the vertex matrix and whose second component is the vector of
%   interior normalized angles.

%   Copyright 1998 by Toby Driscoll.
%   $Id: double.m 7 1998-05-10 04:37:19Z tad $

if ~any(isinf(p.vertex))
  x = p.vertex;
  x = [real(x) imag(x)];
else
  x = { [real(p.vertex) imag(p.vertex)] p.angle };
end

⌨️ 快捷键说明

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