How to solve equations with more unknowns

조회 수: 1 (최근 30일)
Awais Saeed
Awais Saeed 2018년 11월 9일
답변: Walter Roberson 2018년 11월 10일
I want to write a code to find pi,pj and pk. How to solve these equations, all x and y terms are known.
Eq1 : x=pi.xi + pj.xj + pk.xk
Eq2 : y=pi.yi + pj.yj + pk.yk
Eq3 : pi + pj + pk = 1
  댓글 수: 8
Awais Saeed
Awais Saeed 2018년 11월 10일
Yes it is multiplication(pi*xi). Pi,pj,pk are variables not struct.
Awais Saeed
Awais Saeed 2018년 11월 10일
@walter roberson i have solved the equations with solve() command. But how with numeric \ operator

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 11월 10일
A = [xi, xj, xk;
yi, yj, yk;
1, 1, 1];
b = [x;
y;
1];
sol = A\b;
pi = sol(1); pj = sol(2); pk = sol(3);

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by