# Thread: differential equations

1. ## differential equations

hello everyone. I need to define a differential equation in matlab but i cant figure out how. Can someone please help me.

2. Originally Posted by AUCC
hello everyone. I need to define a differential equation in matlab but i cant figure out how. Can someone please help me.
Yes, first convert the ODE into a first order system, second write a function for x' the input to which is t and x. Finally use ode45 (read the help text).

CB

3. Hey in the ode45 method how can i get the value of y when x is not a integer

for example

ode45(@func, [0:0.05], 0);

Does not work

4. Originally Posted by AUCC
Hey in the ode45 method how can i get the value of y when x is not a integer

for example

ode45(@func, [0:0.05], 0);

Does not work