Tag Info

3

If you use diffeqpy you can use the commands adaptive=false,dt=... to specify fixed time stepping. The following is for using the Dormand-Prince RK45 method with fixed time stepping on the Lorenz equation: from diffeqpy import de import matplotlib.pyplot as plt def f(u,p,t): x, y, z = u sigma, rho, beta = p return [sigma * (y - x), x * (rho - z)...

2

What about avoiding to construct the matrix by using its structure? def odefunc(t,u): dotu = zeros_like(u) T1 = T1func(t) T2 = T2func(t) dotu[0::2] += T1*u[1::2] dotu[1::2] += T1*u[0::2] dotu[1:-1:2] += T2*u[2::2] dotu[2::2] += T2*u[1:-1:2] return dotu This only works if the matrix size is even and not divisible by 4, like ...

13

The problem you are encountering is likely not a consequence of your choice of algorithm, but in fact a consequence of the resulting dynamical system after applying time reversal. Per the definition of an attractor, all points in some neighborhood of the attractor will converge to the attractor under the flow of the dynamical system as $t\to\infty$. However, ...

5

You may have seen depictions of ODE dynamics for the scalar equation $x'(t)=f(t,x(t))$ in the form of a $t,x$ plot in which one plots little arrows in the entire $t,x$ plane. A trajectory starting from a particular $t,x_0$ value then follows the arrows it encounters along its way. Now think of an attractor, i.e., a curve in $t,x$ space to which all of these ...

2

For the first question, the values are stored in the members of the minimo object. Explicitly print(minimo.success) print(minimo.x) For the second part of the question as to how to setup bounds, import scipy.optimize as so from scipy.optimize import Bounds import numpy as np my_bounds = Bounds(0,np.inf) def func_AC(r): return 1/((r[0]**2)+1) guess ...

1

It is possible that since you are exactly at equilibrium, your integrator is taking step sizes too large to resolve your forcing function. This is especially bad for your problem because the forcing function is discontinuous with little support, so the chances that the integrator time steps line up with the discontinuities is pretty low. This is typically ...

3

The paper you linked to describes an algorithm similar to the Kabsch algorithm from what I see. It's used to find the least squares rotation between two sets of points. For your case you need something else entirely. Suppose sensor 1 has matrix $M_1$ at time t and sensor 2 has matrix $M_2$ at time t. That means that a vector, whose coordinates in the local ...

Top 50 recent answers are included