# Integrating with matlab

1. Aug 24, 2010

### a.mlw.walker

So this is really (I think) a matlab question in a mechanical engineering context.

I am trying to find a length using ODE45 Integrator which changes with time.

the length is:

l = k - c +r.cos(q)

where q is an angle (the length is the length of a combustion chamber which varies depending on the position of the piston attached to a flywheel).

My problem though is if i differentiate l, and put that in as dl_dt, for ODE45 to integrate, how do i get the value of the constants back in, because the value of l is found from integrating dl_dt, and not from the geomety like the l equation above is?

thank you