15c1 - 3c2 - c3 = 3300
-3c1 +18c2 - 6c3 = 1200
-4c1 - c2 + 12c3 = 2400
(a) Determine the matrix inverse(b) Use the inverse matrix to determine a solution(c) Determine how much the rate of mass input to reactor 3 must be increased to include a 10 g/m^3 rise in the concentration of reactor 1.(d)How much will the concentration in reactor 3 be reduced if the rate of mass input to reactors 1 and 2 is reduced by 700 and 350 g/day, respectively?
Matlab code:
%(a) Determine the matrix inverse
A = [15 -3 -1; -3 18 -6; -4 -1 12]
inversematrix = inv(A)
%(b) Use the inverse matrix to determine a solution
B = [3300; 1200; 2400]
x = inversematrix * B
OriginalB = A * x
%(c) Determine how much the rate of mass input to reactor
%3 must be increased to incduce a 10 g/m^3 rise in the concentration of
%reactor 1.
[x(1)+10; x(2); x(3)]
OriginalBplus10 = A * [x(1)+10; x(2); x(3)]
%(d)How much will the concentration in reactor 3 be reduced if the rate of
%mass input to reactors 1 and 2 is reduced by 700 and 350 g/day,
%respectively?
Bnew = [2600; 850; 2400]
newx = inversematrix * Bnew
newB = A * newx
diffx = x - newx
Results
(A)
A =
15 -3 -1
-3 18 -6
-4 -1 12
inversematrix =
0.072538860103627 0.012780656303972 0.012435233160622
0.020725388601036 0.060794473229706 0.032124352331606
0.025906735751295 0.009326424870466 0.090155440414508
(B)
B =
3300
1200
2400
x =
1.0e+02 *
2.845595854922280
2.184455958549223
3.130569948186529
OriginalB =
1.0e+03 *
3.299999999999999
1.200000000000001
2.400000000000000
ans =
1.0e+02 *
2.945595854922280
2.184455958549223
3.130569948186529
(C)
OriginalBplus10 =
1.0e+03 *
3.450000000000000
1.170000000000001
2.360000000000000
(D)
Bnew =
2600
850
2400
newx =
1.0e+02 *
2.293091537132988
1.826597582037997
2.916580310880829
newB =
1.0e+03 *
2.600000000000000
0.850000000000001
2.400000000000000
diffx =
55.250431778929169
35.785837651122620
21.398963730569960
No comments:
Post a Comment