필터 지우기
필터 지우기

Help Solving equations with variables

조회 수: 1 (최근 30일)
Shreyas
Shreyas 2012년 12월 13일
Hi I have 8 equations with 8 unknowns as shown below.
p1(1) = alpha1 * ([g11 g12 g13] * p_1);
p1(2) = alpha1* ([g21 g22 g23]* p_1);
p2(1) = alpha2 * ([g11 g12 g13]* p_2);
p2(2) = alpha2 * ([g21 g22 g23]* p_2);
p3(1) = alpha3 * ([g11 g12 g13]* p_3);
p3(2) = alpha3 * ([g21 g22 g23]* p_3);
p4(1) = alpha4 *([g11 g12 g13] * p_4);
p4(2) = alpha4 *([g21 g22 g23] * p_4);
I know the values of the 3x1 vectors p1,p2,p3,p4, p_1,p_2,p_3,p_4...
g11, g12.. till g32 are my unknowns that I want to solve. alpha1, alpha2,alpha3 and alpha4 are also equations with the variables of g32 and g31 as shown below
alpha1 = 1 / ([g31 g32 1]*p_1);
alpha2 = 1 / ([g31 g32 1]* p_2);
alpha3 = 1 / ([g31 g32 1]* p_3);
alpha4 = 1 / ([g31 g32 1]* p_4);
I have used
syms g11 g12 g13 g21 g22 g23 g31 g32;
to declare the symbols.. when I solve these equations using the "solve" command, the "ans" matrix just says [g11; g12; ..; g32] instead of numericals values of the solved equations.. how do I get the values?
  댓글 수: 2
Muruganandham Subramanian
Muruganandham Subramanian 2012년 12월 13일
If both sides of equation having unknown values for variables, How do you get the values?
Walter Roberson
Walter Roberson 2012년 12월 13일
Please show the code you used.

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

답변 (1개)

Muruganandham Subramanian
Muruganandham Subramanian 2012년 12월 13일
편집: Muruganandham Subramanian 2012년 12월 13일
If both sides(i.e LHS, RHS) of equation having unknown values for variables, How will you get the values?
  댓글 수: 1
Shreyas
Shreyas 2012년 12월 13일
No, I have the values for p1,p2,p3,p4,p_1,p_2,p_3 and p_4... those are known values on the LHS.

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

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by