next up previous contents
Next: Using rk4plot.m Up: Using eulplot.m Previous: Example   Contents

Higher order methods

You can use eulplot.m for methods other than the Euler method if you change eulerfcn accordingly. For instance, if you use the improved Euler method for the equation $x'=t^2+x^2$, then the iteration equation is

x_{n+1}=x_n+{h\over 2}(t_n^2+x_n^2)+{h\over 2}

Consequently, you want to have the following line in initn.m:


Michael Renardy