MATLAB Function Reference 
Create or alter options structure for input to ordinary differential equation (ODE) solvers
Syntax
options = odeset('name1',value1,'name2',value2,...) options = odeset(oldopts,'name1',value1,...) options = odeset(oldopts,newopts) odeset
Description
The odeset
function lets you adjust the integration parameters of the ODE solvers. The ODE solvers can integrate systems of differential equations of one of these forms
See below for information about the integration parameters.
options = odeset('name1',value1,'name2',value2,...)
creates an integrator options structure in which the named properties have the specified values. Any unspecified properties have default values. It is sufficient to type only the leading characters that uniquely identify a property name. Case is ignored for property names.
options = odeset(oldopts,'name1',value1,...)
alters an existing options structure oldopts
.
options = odeset(oldopts,newopts)
alters an existing options structure oldopts
by combining it with a new options structure newopts
. Any new options not equal to the empty matrix overwrite corresponding options in oldopts
.
odeset
with no input arguments displays all property names as well as their possible and default values.
ODE Properties
The available properties depend on the ODE solver used. There are several categories of properties:
ode15s
Property 
Value 
Description 

OutputFcn 
Function 
Installable output function. The ODE solvers provide sample functions that you can use or modify:  

odeplot 
Time series plotting (default) 


odephas2 
Twodimensional phase plane plotting 


odephas3 
Threedimensional phase plane plotting 


odeprint 
Print solution as it is computed 


To create or modify an output function, see ODE Solver Output Properties in the "Differential Equations" section of the MATLAB documentation.  
OutputSel 
Vector of integers 
Output selection indices. Specifies the components of the solution vector that the solver passes to the output function. OutputSel defaults to all components.  
Refine 
Positive integer 
Produces smoother output, increasing the number of output points by the specified factor. The default value is 1 in all solvers except ode45 , where it is 4 . Refine doesn't apply if length (tspan ) > 2 .  
Stats 
on  {off } 
Specifies whether the solver should display statistics about the computational cost of the integration. 
Property 
Value 
Description 
Events 
Function 
Locate events. Set this property to @Events , where Events is the name of the events function. See the ODE solvers for details. 
Property 
Value 
Description 
Mass 
Constant matrix  function 
For problems set this property to the value of the constant mass matrix . For problems , set this property to @Mfun , where Mfun is a function that evaluates the mass matrix . 
MStateDependence 
none  {weak}  strong 
Dependence of the mass matrix on . Set this property to none for problems . Both weak and strong indicate , but weak results in implicit solvers using approximations when solving algebraic equations. For use with all solvers except ode23s . 
MvPattern 
Sparse matrix 
sparsity pattern. Set this property to a sparse matrix with if for any , the component of depends on component of , and 0 otherwise. For use with the ode15s , ode23t , and ode23tb solvers when MStateDependence is strong. 
MassSingular 
yes  no  {maybe} 
Indicates whether the mass matrix is singular. The default value of 'maybe' causes the solver to test whether the problem is a DAE. For use with the ode15s and ode23t solvers. 
InitialSlope 
Vector 
Consistent initial slope , where satisfies . For use with the ode15s and ode23t solvers when solving DAEs. 
In addition there are two options that apply only to the ode15s
solver.
See Also
deval
, odeget
, ode45
, ode23
, ode23t
, ode23tb
, ode113
, ode15s
, ode23s
, @
(function handle)
odeget  ones 