chapter  22
4 Pages

Displaying Results

Note that ode45 returns a 61-by-2 solution yy. Row i of yy contains the numerical approximation to y1 and y2 at time tr(i). Compare the symbolic and numeric solutions using the same code for the previous ODE. ode45 can return a structure s=ode45(...) which can be used by deval to evaluate the numerical solution at any time t that you specify. There are seven other ODE solvers, able to handle stiff ODEs and for differential algebraic equations. Some can be more efficient, depending on the type of ODE you are trying to solve. Type doc ode45 for more information.