how to solve coupled both differential equations and normal equations
Show older comments
I know how to use ode45 to solve the coupled differential equations. The problem now is there are many other variables. Let's say I want to solve coupled differential equations related to variable A (colume matrix) and t. t as the time.
dA(1)/dt= 6x(A(1)-A(2))- B(1)x(A(1)-A(6))
dA(2)/dt= 5x(A(2)-A(3))- B(2)x(A(2)-A(6))
dA(3)/dt= 4x(A(3)-A(4))- B(3)x(A(3)-A(6))
dA(4)/dt= 3x(A(4)-A(5))- B(4)x(A(4)-A(6))
dA(5)/dt= -B(5)x(A(5)-A(6))+C+ D
dA(6)/dt= B(1)x(A(1)-A(6))+B(2)x(A(2)-A(6))+B(3)x(A(3)-A(6))+B(4)x(A(4)-A(6))+B(5)x(A(5)-A(6))+E+F
And the B,C,D,E,F are variables dependent on A(1), A(2),A(3), A(4),A(5), A(5)and also one another.
For example
B(1)+B(2)+B(3)+B(4)+B(5)+B(6)=C
D=6x(A(2)-A(3))
E=7x(A(1)-A(6))
and so on.
And finally I might need to draw A(t) figure and B(t)figure
I don't know how to solve this by using ode45 or if I should still using ode45. Please help. Thank you.
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Computations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!