(Spinoff of #124.)
Have the braid constructor take a function handle as an argument, which could then be used to call ode45 and generate the braid.
Example:
b = braid(@func,tspan,XY0); % create braid of trajectories starting at XY0
Syntax is meant to mimic ode45. Could even pass optional ode45 options at the end. The RHS function @func only takes one trajectory at a time, and XY0 is a set of n initial conditions. (XY0 should have dimension [2 n], to agree with the XY constructor.)
An implementation might involve going through by pairs of strings, and setting and @events function for when the x coordinates coincide.
(Spinoff of #124.)
Have the braid constructor take a function handle as an argument, which could then be used to call
ode45and generate the braid.Example:
Syntax is meant to mimic
ode45. Could even pass optionalode45options at the end. The RHS function@funconly takes one trajectory at a time, andXY0is a set ofninitial conditions. (XY0should have dimension[2 n], to agree with theXYconstructor.)An implementation might involve going through by pairs of strings, and setting and
@eventsfunction for when thexcoordinates coincide.