How to solve a system of equations symbolically? (MATLAB R2011a)

조회 수: 52 (최근 30일)
Dan
Dan 2012년 11월 30일
This is what I'm trying to do:
syms x1 x2 x3 X1 X2 X3 t
S = solve('x1 = 3*t*X1+X2', 'x2 = 2*t^2*X2', 'x3 = 5*t*X3')
S = [S.X1 S.X2 S.X3]
I get a reference to non-existent field error though.
It's solving for x1, x2, and x3, but need to solve for X1, X2, and X3 in terms of x1, x2, x3 and t.
Please help! Thanks!

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 11월 30일
편집: Azzi Abdelmalek 2012년 11월 30일
syms x1 x2 x3 X1 X2 X3 t
S = solve(x1==3*t*X1+X2, x2==2*t^2*X2, x3==5*t*X3,X1,X2,X3)
S = [S.X1 S.X2 S.X3]
  댓글 수: 6
Azzi Abdelmalek
Azzi Abdelmalek 2012년 11월 30일
Then no need to use syms
Walter Roberson
Walter Roberson 2012년 12월 1일
Yes, correct. If everything is quoted, syms is not needed.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by