How to solve equations with more unknowns
1 次查看(过去 30 天)
显示 更早的评论
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
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!