Butterfly function
Opened this issue · 1 comments
bigPeterZhang commented
AndrewGibbs commented
This should do it :-)
%% define the Butterfly function
% choose number of points per SD contour:
Npts = 10;
%define the phase coefficients of g(s;W,X,Y,Z),
% starting with leading order term first:
g = @(W,X,Y,Z) [1 0 W Z Y X 0];
% create funciton handle to PathFinder
Bu = @(W,X,Y,Z) PathFinder(0, pi, [], g(W,X,Y,Z), 1, Npts, ...
'infcontour', [true true]);
% third argumnet is empty because there is no amplitude parameter
% fifth argument is one because there is no frequency parameter
% optional argument 'infcontour' says that this a
% line contour from angle 0 to angle pi (i.e. the real line)
%% try some random points
w = 10*(rand()-0.5);
x = 10*(rand()-0.5);
y = 10*(rand()-0.5);
z = 10*(rand()-0.5);
Bu(w, x, y, z)