Solving a system of linear equations question.
2 次查看(过去 30 天)
显示 更早的评论
[EDIT: Wed Jun 15 04:15:02 UTC 2011 - Reformat - MKF]
hey . how i solve this linear equations (ODE) in matlab
x+y-2=-2z
3x+z=y+6
x+3y+4z-4=0
2 个评论
John D'Errico
2011-5-11
How is this an ODE? An ODE is a differential equation. Where are the derivatives?
采纳的回答
更多回答(2 个)
Laura Proctor
2011-5-11
First, set the equations up as matrices. So, if you had the following equations:
5*x + 2*y = 10
x = 2
You would convert this to matrix form:
Ax = b
A = [ 5 2 ; 1 0 ]
b = [ 10 ; 2 ]
x = A\b
And x will contain the variables x and y. Just follow these steps to solve for your system. Good luck!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!