Help in method for solving simultaneous equations

1 view (last 30 days)
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!

Accepted Answer

David Hill
David Hill on 14 Dec 2020
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]

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!