Biomedical Engineering Reference
In-Depth Information
In MATLAB we type
>>
A
¼
[1 2 3 4];
>>
B
¼
[1 4 9 16];
>>
AB
¼
conv(A, B)
which returns
AB
16 0 0 5 4 4
Note that the semicolon after the matrix A and B suppresses the echo of the command.
Symbolically, the polynomial product of Equation (A.13) and Equation (A.14) is given by
6
5
4
3
2
(
x Þ¼ x
þ
6
þ
20
þ
50
þ
75
þ
84
x þ
64
ð
A
:
15
Þ
AB
x
x
x
x
To add polynomials together, the polynomials need to be of the same order. For example,
consider adding the following two polynomials:
5
4
3
2
S
(
x Þ¼ x
þ
4
x
þ
5
x
þ
6
x
þ
7
x þ
2
ð
A
:
16
Þ
and
4
3
2
Þ
Since the polynomial in Equation (A.17) is 4 th order, we pad the row vector with a zero in
place of a
T
(
x Þ¼
2
x
þ
9
x
þ
8
x
4
x þ
5
ð
A
:
17
5 coefficient. Thus the polynomials are entered in MATLAB as
x
>>
S
¼
[145672];
>>
T
¼
[0298
4 5];
>>
U
¼
S
þ
T
which returns
U
¼ 16 4 437
or symbolically
5
4
3
2
x
þ
6
x
þ
14
x
þ
14
x
þ
3
x þ
7
ð
A
:
18
Þ
To divide one polynomial by another, the MATLAB command “deconv(A,B)” is used,
which represents
B
divided into
A
, or equivalently
A
divided by
B
. As there is usually a
remainder from polynomial division, the syntax used is [Q, V]
¼
deconv(A,B), where
Q
is
the quotient polynomial and
is the remainder. Using MATLAB, the ratio of polynomials
given by Equations (A.16) and (A.17), that is,
V
5
4
3
2
4
x
þ
4
x
þ
5
x
þ
6
x
þ
7
x þ
2 divided by 2
x
þ
3
2
9
x
þ
8
x
4
x þ
5, is written
>>
S
¼
[145672];
>>
T
¼
[2 9 8
4 5];
>>
[Q, R]
¼
deconv(S, T)
Q
0.5000
0.2500
Search WWH ::




Custom Search