If your problem has discontinuities, it's best to communicate
them to the solver using an options structure. To do this, use the ddeset function to create an options structure
containing the discontinuities in your problem.

There are three properties in the options structure
that you can use to specify discontinuities; InitialY, Jumps,
and Events. The property you choose depends on
the location and nature of the discontinuities.

Nature of Discontinuity

Property

Comments

At the initial value t = t_{0}

InitialY

Generally the initial value y(t_{0})
is the value S(t_{0})
returned by the history function, meaning the solution is continuous
at the initial point. If this is not the case, supply a different
initial value using the InitialY property.

In the history, i.e., the solution at t <t_{0},
or in the equation coefficients for t >t_{0}

Jumps

Provide the known locations t of the
discontinuities in a vector as the value of the Jumps property.
Applies only to dde23.

State-dependent

Events

dde23, ddesd, and ddensd use
the events function you supply to locate these discontinuities. When
the solver finds such a discontinuity, restart the integration to
continue. Specify the solution structure for the current integration
as the history for the new integration. The solver extends each element
of the solution structure after each restart so that the final structure
provides the solution for the whole interval of integration. If the
new problem involves a change in the solution, use the InitialY property
to specify the initial value for the new integration.