- #1

- 1

- 0

**Help me with coupled ode45 equations in matlab plz**

I have no idea to turn these into matlab code, and here is the porblem:

y(1)' = y(2)

y(2)' = - (r+re)/(L+le)*y(2) - y(1)/c*(l+le)

y(3)' = y(4)

y(4)' = -c*y(4).^2 /m+L*y(2).^2/(2*m)

where

re = ro+Rpr*z+Lpr*z'

le = Lo+Lpr*z

the rest parameters are given numbers, and z is the changing position, the variable.

the given task is like this, two differential equations:

(L+le)*q''+(r+re)*q'+q/c=0

z''+c*(z')^2/m=Lpr*(q').^2/(2*m)

I appreciate your help!