matlab.ode.options.DDENSD Properties
Use matlab.ode.options.DDENSD objects with ode objects to
        specify options for solving delay differential equations. ode objects
        automatically populate the SolverOptions property with an options object specific to the selected
        solver, so you generally do not need to create matlab.ode.options.DDENSD objects
        explicitly.
Specify options for the DDE problem by changing property values of the
            matlab.ode.options.DDENSD object using dot notation. For example, if
            F is an ode object, then
            F.SolverOptions.OutputFcn = @odeplot specifies an output function
        that the solver calls after each successful time step.
Step Size
Suggested initial step size, specified as a positive scalar. InitialStep
            sets an upper bound on the size of the first step that the solver tries.
If you do not specify an initial step size, then the solver bases the initial step size on the
            slope of the solution at the initial time point of the integration. If the slope of all
            solution components is zero, then the solver might try a step size that is too large. If
            you know that the initial step size is too large, or if you want to be sure that the
            solver resolves important behavior at the beginning of the integration, then use
                InitialStep to provide a suitable initial step size.
Example: F.SolverOptions.InitialStep = 1e-3, where F is an ode object, sets an upper bound of 1e-3 on the size of the initial step.
Maximum step size, specified as a positive scalar. MaxStep sets an upper
            bound on the size of any step that the solver takes. If the equation has periodic
            behavior, for example, then you can set MaxStep to a fraction of
            the period so that the solver does not step over an area of interest.
- Do not use - MaxStepjust to obtain more output points, as it can significantly slow down the integration. Instead, use the- Refineoption of the- solvemethod to compute additional points at low computational cost.
- Do not use - MaxStepto increase the accuracy of the solution. If the solution is not accurate enough, then reduce the value of- RelativeToleranceand use the solution to determine a suitable value for- AbsoluteTolerance.
- Avoid using - MaxStepto make sure the solver does not step over some behavior that occurs only once in the integration interval. If you know the time at which the behavior occurs, then break the interval into two pieces and solve each separately. If you do not know the time at which the behavior occurs, try reducing- RelativeToleranceand- AbsoluteTolerance. Use- MaxSteponly as a last resort in this case.
Example: F.SolverOptions.MaxStep = 1e-2, where F is an
                ode object, sets an upper bound of 1e-2 on the
            step size.
Minimum step size, specified as a positive scalar. MinStep sets a
            lower bound on the size of any step that the solver takes. MinStep
            must be less than MaxStep.
Solver steps are limited by floating-point precision regardless of the value of
              MinStep.
Example: F.SolverOptions.MinStep = 1e-10, where
              F is an ode object, sets a lower bound of
              1e-10 on the step size.
Error Control
Control error relative to the norm of the solution, specified as "off" or
                "on". If NormControl is
                "on", then the solver controls the error e at
            each step using the norm of the solution y rather than its absolute
            value:
norm(e(i)) <= max(RelativeTolerance*norm(y(i)),AbsoluteTolerance(i))
Example: F.SolverOptions.NormControl = "on", where F is an ode object, controls step error using the norm of the solution.
Solver Output
Output function, specified as a function handle. solve
            calls the output function after each successful time step. If you use solutionFcn to solve the ODE problem, then
                OutputFcn is ignored.
This table describes the built-in output functions that you can specify for
                OutputFcn.
| Function Name | Description | 
|---|---|
| odeplot | Plot all components of the solution against time. | 
| odephas2 | Create a 2-D phase plane plot of the first two solution components. | 
| odephas3 | Create a 3-D phase plane plot of the first three solution components. | 
| odeprint | Print the solution and time step to the Command Window. | 
If you write a custom output function, then it must use this function signature:
status = myOutputFcn(t,y,flag)
The output function you write must also respond appropriately to these flags.
| Flag | Description | 
|---|---|
| "init" | The solver calls  | 
| [] | The solver calls  
 
 | 
| "done" | The solver calls  | 
Example: F.SolverOptions.OutputFcn = @odeplot, where
                F is an ode object, specifies
                odeplot as the output function that the solver calls after each
            successful time step.
Data Types: function_handle
Component selection for the output function, specified as a vector of indices. The
            vector specifies which components of the solution to pass to the output function. The
            number of solution components is equal to the number of elements in the vector output of
            the ODE function (which is stored in the ODEFcn property of the
                ode object).
Example: F.SolverOptions.OutputSelection = [1 3], where
                F is an ode object, passes the first and third
            components of the solution to the output function.
Other Properties
Compute consistent initial conditions when solving, specified as a numeric or
            logical 1 (true) or 0
              (false). For more information, see decic.
Example: F.SolverOptions.ComputeConsistentInitialConditions = 0,
            where F is an ode object, disables computing
            consistent initial conditions when solving the ODE problem.
Version History
Introduced in R2025a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)