ddt_uniform()#

ddt_uniform(states, dt, order=2)[source]#

Approximate the time derivatives for a chunk of snapshots that are uniformly spaced in time.

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]).

dtfloat

The time step between the snapshots, i.e., t[j+1] - t[j] = dt.

orderint {2, 4, 6}

The order of the derivative approximation. See https://en.wikipedia.org/wiki/Finite_difference_coefficient.

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].