ODE45 is a stepsize controlled Dormand Prince Integrator with local extrapolation.
If you want to get exactly the same results, you find the instructions here:
- The MATLAB ODE Suite, L. F. Shampine and M. W. Reichelt, SIAM Journal on Scientific Computing, 18-1, 1997.
- Mark W. Reichelt and Lawrence F. Shampine, 6-14-94
I have written such an Dormand Prince method by my own also as homework in the university. It is possible to do this in 2 or 3 hours. You find many published codes of others also, e.g. in the FileExchange.
If you are trying this by your own, please post your code and explain, what "I'm stuck means". Based on the given information it is not possible to suggest a solution of your porblem.