MATLAB Help me with coupled ode45 equations in matlab

  • Thread starter sophieji
  • Start date
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!
 

Want to reply to this thread?

"Help me with coupled ode45 equations in matlab" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top