How can i solve this using MATLAB ?

17 views (last 30 days)
Bello Khadijah
Bello Khadijah on 17 Jun 2015
Answered: Star Strider on 17 Jun 2015
2=0.04*F1+0.54*F2+0.26*F3;
6=0.93*F1+0.24*F2+0*F3;
2=0.03*F1+0.22*F2+0.74*F3;

Answers (2)

Mischa Kim
Mischa Kim on 17 Jun 2015
Bello, if you have access to the Symbolic Math Toolbox:
syms F1 F2 F3
sol = solve([2==0.04*F1+0.54*F2+0.26*F3,...
6==0.93*F1+0.24*F2+0*F3,...
2==0.03*F1+0.22*F2+0.74*F3], [F1,F2,F3])
sol.F1
ans =
1520/261

Star Strider
Star Strider on 17 Jun 2015
Or you can use mrdivide to solve it as a matrix equation in core MATLAB:
F = [0.04 0.54 0.26; 0.93 0.24 0; 0.03 0.22 0.74]\[2; 6; 2];
[F1,F2,F3] = deal(F(1), F(2), F(3))
produces:
F1 =
5.8238e+000
F2 =
2.4330e+000
F3 =
1.7433e+000

Categories

Find more on Symbolic Math Toolbox 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!