ddt_nonuniform()#

ddt_nonuniform(states, t)[source]#

Approximate the time derivatives for a chunk of snapshots with a second-order finite difference scheme.

Parameters
states(n, k) ndarray

States to estimate the derivative of. The jth column is a snapshot that corresponds to the jth time step, i.e., states[:, j] = x(t[j]).

t(k,) ndarray

The times corresponding to the snapshots. May not be uniformly spaced. See ddt_uniform() for higher-order computation in the case of evenly-spaced-in-time snapshots.

Returns
ddts(n, k) ndarray

Approximate time derivative of the snapshot data. The jth column is the derivative dx / dt corresponding to the jth snapshot, states[:, j].