You have five equations in four unknowns, which means that you probably have no solution to your problem as stated. Consider solving the first four equations:
A = [0.31246 0.15 0.15 0.15
0.15 0.3 0.15 0.15
0.15 0.15 0.3 0.15
0.15 0.15 0.15 0.3 ];
b = [46
40
55
50.5];
c = A\b
c =
48.1346
12.1330
112.1330
82.1330
sum(c)
ans =
254.5337
So you cannot satisfy all of your equations. What would you like to do? Find a least-squares solution? Something else?
Here is a least-squares solution:
A = [A;1 1 1 1];
b = [b;200];
c = A \ b
c =
40.1980
-1.1451
98.8549
68.8549
sum(c)
ans =
206.7627
Alan Weiss
MATLAB mathematical toolbox documentation
Best Answer