Documente Academic
Documente Profesional
Documente Cultură
6
12
6
0
0 0 0
4 2 1
0 1 0
1 0 0
1 0 1
1 3
1
b
c
1 5 1.8
3 3 0.5 = d = 0
e
0 0 0.2
1 1 0
f
(1)
This equation system has 5 equations and 6 unknown, thus one degree of freedom. One variable (f) is chosen
as independent variable. The vector of parameters is separated in the independent part (f and 1, for biomass)
and the dependent part (a,b,.c,d,e):
6
12
6
0
0
4
0
1
1
0 1 a 3
1 1 b 5
0 3 c + 3
0 0 d 0
1 1 e 1
0
2
1
0
0
A
1
0
0
1.8
f
0.5 = 0
1
0.2
0
0
0
(2)
6
12
6
0
0
4
0
1
1
0
2
1
0
0
A
0 1 a
3
1 1 b
5
0 3 c = 3
0 0 d
0
1
1 1 e
x
d
A
1
1.8
f
0.5
1
0.2
x
0 f
(3)
x d = A d 1 A f x f
(4)
b
0
4
0
1
1
c
0
2
1
0
0
d
0
1
0
0
1
e
1
1
3
0
-1
f
3
5
3
0
-1
1
1;
1.8;
0.5;
0.2;
0];
(5 min)
Ad = A(:,1:5);
Af = A(:,6:7);
syms f;
x = -inv(Ad) * Af * [f; 1]
(5 min)
The symbolic solution can be used to generate the plot, using the command subs:
clear all
%
a
A = [6
12
6
0
0
b
0
4
0
1
1
c
0
2
1
0
0
d
0
1
0
0
1
e
1
1
3
0
-1
f
3
5
3
0
-1
1
1;
1.8;
0.5;
0.2;
0];
(5 min)
Ad = A(:,1:5); Af = A(:,6:7);
syms f;
% declare the symbolic variable f
(5 min)
x = -inv(Ad) * Af * [f; 1]
% solve the system (symbolically, because of f)
fval = 1:0.1:2;
% values of f
(5 min)
xval = [];
% empty matrix to store solutions
for i=1:length(fval)
xval = [xval subs(x, 'f', fval(i))]; % substitute with all fval and store
end
% make the plot and label it
(5 min)
plot(fval, xval(1,:),'b', fval, xval(5,:), 'r');
xlabel('f'); ylabel('a, e'); legend('a','e');
0.2
0
-0.2
a
e
a, e
-0.4
-0.6
-0.8
-1
-1.2
1.2
1.4
1.6
f
1.8