Solving a system of linear equations question.

5 ビュー (過去 30 日間)
zizo
zizo 2011 年 5 月 11 日
[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
John D'Errico 2011 年 5 月 11 日
How is this an ODE? An ODE is a differential equation. Where are the derivatives?
Sean de Wolski
Sean de Wolski 2011 年 5 月 11 日
It's an ode like a poem...

サインインしてコメントする。

採用された回答

Sean de Wolski
Sean de Wolski 2011 年 5 月 11 日
[1 1 2;3 -1 1; 1 3 4]\[-2;6;4]
  1 件のコメント
zizo
zizo 2011 年 5 月 11 日
thanks

サインインしてコメントする。

その他の回答 (2 件)

Laura Proctor
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 ]
Finally, you can solve for this system of equations in MATLAB using the BACKSLASH operator:
x = A\b
And x will contain the variables x and y. Just follow these steps to solve for your system. Good luck!

zizo
zizo 2011 年 5 月 11 日

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by