Help me with coupled ode45 equations in matlab

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

Answers and Replies

Related Threads on Help me with coupled ode45 equations in matlab

  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
0
Views
2K
  • Last Post
Replies
4
Views
7K
Replies
0
Views
3K
Replies
0
Views
5K
  • Last Post
Replies
3
Views
7K
Replies
0
Views
5K
  • Last Post
Replies
4
Views
6K
Replies
2
Views
24K
Top