Example: Solving a Fully Implicit ODE Problem
The following example shows how to use the function
ode15i to solve the implicit ODE problem defined by Weissinger's equation
with the initial value . The exact solution of the ODE is
The example uses the function
weissinger, which is provided with MATLAB, to compute the left-hand side of the equation.
ode15i, the example uses a helper function
decic to compute a consistent initial value for . In the following call, the given initial value is held fixed and a guess of 0 is specified for . See the reference page for
decic for more information.
You can now call
ode15i to solve the ODE and then plot the numerical solution against the analytical solution with the following commands.
|Solver for Fully Implicit ODEs||Changing ODE Integration Properties|
© 1994-2005 The MathWorks, Inc.