__dasrt__
- :
[x, xdot, t_out, istat, msg] =__dasrt__(fcn, g, x0, xdot0, t)¶ - :
… =__dasrt__(fcn, g, x0, xdot0, t, t_crit)¶ - :
… =__dasrt__(fcn, x0, xdot0, t)¶ - :
… =__dasrt__(fcn, x0, xdot0, t, t_crit)¶ Integrate the implicit system f (x, xdot, t) = 0 with DASRT and stop at the first time a component of the constraint function g (x, t) crosses zero.
fcn is a function handle, a function name, or a cell array
{f, jac};f (x, xdot, t)returns the residual andjac (x, xdot, t, cj)the optional iteration matrix. g is a function handle (or name) returning a vector of constraint values. When g is omitted no root search takes place.x0 and xdot0 are the initial state and derivative at the first element of t, the list of requested output times. t_crit optionally lists times that must not be stepped past.
The rows of x and xdot are the solution at the times returned in t_out. These are the requested times up to and including the stopping time; when a root ended the run, the last entry of t_out is the time of the root.
istat is 3 when all requested times were reached and 4 when a root of g stopped the integration; negative values mark a failure, which is raised as an error unless istat is requested. msg is the matching text.
Settings are controlled with
dasrt_options.