MATLAB: Matlab 2008b VC++ ODE45

2008bcode45

I am trying to utilize the ODE45 functionality of Matlab in Visual C++ 2010. Searching the Internet, I see that there used to be a file "matlab.hpp" that could be included in a C++ project, but that in R2008b (the version of Matlab I am using), this is not an option. I did try searching Matlab Central for "Matlab 2008 C++ ODE45" and got no hits, so either that was too specific or there really is no solution already posted. If anyone knows how to do this (use ODE45 in C++), I would appreciate the help.
Thanks in advance.

Best Answer

Matlab's ODE45 is a stable and well tested implementation of explicit Runge-Kutta method of Dormand-Prince. It is a 4th order method using an embedded 5th order method for the stepsize control.
This method has been implemented in C directly very often. Look for the terms "RK45" and "Dormand-Prince" in the net, e.g. at www.netlib.org. The C-implementation can be 10 times faster than ODE45.m and I do not see advantages of using the Matlab integrator.