Returns phase-plot data from a solution of an ODE (pairs of components). Useful for plotting trajectories such as (y, dy), (x, y), (x, z), etc.
Solution of an ODE
The first component index
The second component index
// Phase plot of harmonic oscillator (y vs dy)const ode = Chalkboard.diff.harmonic();const sol = Chalkboard.diff.solve(ode, { t0: 0, t1: 20, steps: 2000, y0: { y0: 1, dy0: 0 } });const data = Chalkboard.diff.phase(sol, 0, 1); Copy
// Phase plot of harmonic oscillator (y vs dy)const ode = Chalkboard.diff.harmonic();const sol = Chalkboard.diff.solve(ode, { t0: 0, t1: 20, steps: 2000, y0: { y0: 1, dy0: 0 } });const data = Chalkboard.diff.phase(sol, 0, 1);
Returns phase-plot data from a solution of an ODE (pairs of components). Useful for plotting trajectories such as (y, dy), (x, y), (x, z), etc.