System of equations zero variable
이전 댓글 표시
I would like to solve the following series of equations
syms x y z
sol = solve([0*x + 1*y + 2*z ==4, x+y+z ==4], [x, y, z])
xsol = sol.x
ysol = sol.y
zsol = sol.z
Where the answers would be [0 4 0; 1 2 1; 2 0 2] but because MATLAB solves the first equation as 1y + 2z = 4 (removing the x variable because it's multiplied times 0) the only solution that it can come up with that satisfies both equations is 0 4 0. How do I fix this?
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Equation Solving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!