No BSD License  

Highlights from
Schwarz-Christoffel Toolbox

image thumbnail
from Schwarz-Christoffel Toolbox by Toby Driscoll
Computes conformal maps to polygons, allowing easy solution of Laplace's equation.

hpimapfun(wp,yp,flag,scale,z,beta,c);
function zdot = hpimapfun(wp,yp,flag,scale,z,beta,c);
%   Used by HPINVMAP for solution of an ODE.

%   Copyright 1998 by Toby Driscoll.
%   $Id: hpimapfun.m 103 2001-02-21 17:08:53Z driscoll $

lenyp = length(yp);
lenzp = lenyp/2;

% Don't allow points in lower half-plane. This really messes up the
% derivative calculation.
zp = yp(1:lenzp) + i*max(0,yp(lenzp+1:lenyp));

f = scale./hpderiv(zp,z,beta,c);
zdot = [real(f);imag(f)];

Contact us at files@mathworks.com