So I got an idea to simplify the left hand side of the first ode from dr^3/dt to 3*r^2*(dr/dt).
Dividing both sides of the first equation by 3*r^2 gives:
dydt(1)=((-D*Cs)/(rho*r0^2*y(1)))*(1-y(2)); % dr*/dt
It took a long time to run and when it finished I got this error:
"Error using horzcat Requested 2x528701600 (7.9GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in ode45 (line 484) yout = [yout, zeros(neq,chunk,dataType)]; "
Any idea what this means?
I also attach my files incase anyone has time to look into it.
Thanks!