Help in method for solving simultaneous equations
1 次查看(过去 30 天)
显示 更早的评论
I was wondering if anyone could help me solve 7 unknowns with 7 simultaneous equations in MATLAB, i understand the backslash method but with some equations being in a different format from one another I am stuck as to how to present them and solve them in MATLAB code.
have (1/4.5)(B) - (1/4.5)(B1) = F
(1/4.5)(B) - (1/4.5)(B2) = F4
(1/15)(B1) - (1/15) = F1
(1/11)(B2) - (1/11) = F2
(1/18)(B2) - (1/18) = F3
F = F1 + F2 + F3
F = F1 + F4
I need to find F1, F2, F3, F4, B, B1, B2
Where F is an inputted value at the start, so can be any value
Thank you!
0 个评论
采纳的回答
David Hill
2020-12-14
F=5;%whatever you want
A=[0 0 0 0 1/4.5 -1/4.5 0;0 0 0 -1 1/4.5 0 -1/4.5;-1 0 0 0 0 1/15 0;0 -1 0 0 0 0 1/11;0 0 -1 0 0 0 1/18;1 1 1 0 0 0 0;1 0 0 1 0 0 0];
b=[F;0;1/15;1/15;1/18;F;F];
x=A\b;%[F1,F2,F3,F4,B,B1,B2]
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!