Skip to content

decic

ode · scripts/ode/decic.m

: [y0mod, yp0mod] = decic (fcn, t0, y0, fixed_y0, yp0, fixed_yp0)
: [y0mod, yp0mod] = decic (…, opts)
: [y0mod, yp0mod, resnorm] = decic (…)

Consistent initial conditions for the implicit system fcn (t, y, yp) = 0 at time t0.

y0 and yp0 are guesses; entries flagged with 1 in fixed_y0 and fixed_yp0 are held at their guessed values, the others may change. The free entries are moved as little as possible (in the 2-norm) until the residual of fcn vanishes. At most numel (y0) entries can be fixed in total. resnorm is the 2-norm of the final residual.