Hi all,(adsbygoogle = window.adsbygoogle || []).push({});

I'm trying to use MATLAB to obtain simulations for some equations that describe a model. I'm new to MATLAB (though I've taken a course in C++ and another in Java), so I read a bit on the mathworks website on solving ODEs, and settled on ode45

The equations I'm trying to model are the following (see link):

http://i.imgur.com/vWATx.jpg

As can be seen, the first equation is a straightforward (I guess?) ODE, where the L function is defined, for some x, as L(x)=coth(x)-(1/x). I was not sure how to write that (d ln L/dE)^(-1), so I just had WolframAlpha evaluate it and I typed it in.

Mentioned earlier, I believe that I got the code down for the first ODE:

Assuming this gives me the right value for E (I didn't know how to write xi_E on MATLAB), how do I go about to using the solution for E in the second equation? I thought defining the solution, i.e. something likePHP:

sol = ode45(@firstode,tspan,E0)

would do it...but that doesn't seem to work. Can y'all provide any suggestions?

NOTE: The code written does not include anything re. the second equation as I've yet to solve the dilemma I'm facing.

Sorry for the long post. Thanks all!

MATLAB's a bit strange -- this would be nicer on C++ :(

Sincerely,

RedAnsar

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB - Using solution of one ODE in another

Loading...

Similar Threads - MATLAB Using solution | Date |
---|---|

Matlab Solving equation with integration using MATLAB | Aug 4, 2017 |

Matlab Working out an equation on MATLAB using co-ordinates | Mar 8, 2017 |

BioHeat Equation solution in MATLAB using pdepe | Dec 20, 2015 |

Stability issues of ODE solutions using Matlab | Apr 4, 2013 |

Equation with 3 unknowns. how do i find the maximum solution using matlab? | Feb 8, 2012 |

**Physics Forums - The Fusion of Science and Community**