Biology Reference
In-Depth Information
the entire matrix by the vector. We can represent this group of equations as a matrix
equation
⎛
⎞
⎛
⎞
⎛
⎞
n
1
(
t
0
+
1
)
A
1
,
1
A
1
,
2
A
1
,
3
A
1
,
4
A
1
,
5
A
1
,
6
A
2
,
1
A
2
,
2
A
2
,
3
A
2
,
4
A
2
,
5
A
2
,
6
A
3
,
1
A
3
,
2
A
3
,
3
A
3
,
4
A
3
,
5
A
3
,
6
A
4
,
1
A
4
,
2
A
4
,
3
A
4
,
4
A
4
,
5
A
4
,
6
A
5
,
1
A
5
,
2
A
5
,
3
A
5
,
4
A
5
,
5
A
5
,
6
A
6
,
1
A
6
,
2
A
6
,
3
A
6
,
4
A
6
,
5
A
6
,
6
n
1
(
t
0
)
⎝
⎠
⎝
⎠
⎝
⎠
n
2
(
t
0
+
1
)
n
2
(
t
0
)
n
3
(
t
0
+
1
)
n
3
(
t
0
)
=
.
(7.4)
n
4
(
t
0
+
1
)
n
4
(
t
0
)
n
5
(
t
0
+
1
)
n
5
(
t
0
)
n
6
(
t
0
+
1
)
n
6
(
t
0
)
If we let
⎛
⎝
⎞
⎠
n
1
(
t
0
)
n
2
(
t
0
)
n
3
(
t
0
)
n
(
t
0
)
=
,
n
4
(
t
0
)
n
5
(
t
0
)
n
6
(
t
0
)
and we indicate vectors and matrices in bold, then Eq. (
7.4
) can be written in matrix
form as
(7.5)
To determine the number of individuals in every stage after a year for our example,
we use the following equation, which multiplies the matrix (
7.2
) by the vector (
7.3
):
n
(
t
0
+
1
)
=
An
(
t
0
).
⎛
⎝
⎞
⎠
⎛
⎝
⎞
⎠
0
0
0
0
.
27
3
.
90
40
.
00
800
90
56
23
31
11
0
.
15
0
0
0
0
0
0
0
.
21
0
.
55
0
.
05
0
0
n
(
t
0
+
1
)
=
.
0
0
0
.
35
0
.
45
0
0
0
0
0
0
.
41
0
.
78
0
0
0
0
0
.
05
0
.
19
1
.
00
Matrix multiplication by hand is tedious and there are many software systems that can
be used to carry out matrix computations. Here we give the commands for loading
the matrix
A
and the vector
n
into MATLAB or R and performing the multiplication.
In MATLAB, the projection matrix
A
can be defined with the following command:
A = [0 0 0 0.27 3.90 40.00; 0.15 0 0 0 0 0;
0 0.21 0.55 0.05 0 0; 0 0 0.35 0.45 0 0;
0 0 0 0.41 0.78 0; 0 0 0 0.05 0.19 1.0]
Similarly, we can define the vector
n
with the following command:
n = [800; 90; 56; 23; 31; 11]
To multiply the matrix
A
by the vector
n
, we use the command:
A*n
To conduct the same analysis in R, first define matrix (
7.2
)as
A
using:
Search WWH ::
Custom Search