The Polynomial Toolbox for MATLAB - DCE FEL ČVUT v Praze

The Polynomial Toolbox for MATLAB - DCE FEL ČVUT v Praze The Polynomial Toolbox for MATLAB - DCE FEL ČVUT v Praze

moodle.dce.fel.cvut.cz
from moodle.dce.fel.cvut.cz More from this publisher
22.07.2013 Views

Typing the name of the matrix P now results in Polynomial matrix in s: 2-by-2, degree: 3 P = Matrix coefficient at s^0 : 1 0 0 1 Matrix coefficient at s^1 : 1 0 0 2 Matrix coefficient at s^2 : 0 1 0 1 Matrix coefficient at s^3 : 0 0 2 0 Simple operations with polynomial matrices Addition, subtraction and multiplication In the Polynomial Toolbox polynomial matrices are objects for which all standard operations are defined. Define the polynomial matrices P = [ 1+s 2; 3 4], Q = [ s^2 1-s; s^3 1] P = Q = 1 + s 2 3 4 s^2 1-s s^3 1 The sum and product of P and Q follow easily: S = P+Q S = R = P*Q 1 + s + s^2 3 - s 3 + s^3 5

Entrywise and matrix division Operations with fractions R = s^2 + 3s^3 3 - s^2 3s^2 + 4s^3 7 - 3s Entrywise division of polynomial matrices P and Q yields a fraction T = P./Q results in T = 1 + s 2 ----- ----- s^2 1 - s 3 4 --- - s^3 1 Right matrix division gets a fraction U = P/Q U = 1 PQ 1 + s 2 / s^2 1 - s 3 4 / s^3 1 Left matrix division gets a fraction V = Q\P U = 1 Q P s^2 1 - s \ 1 + s 2 s^3 1 \ 3 4 Polynomial fractions may also enter arithmetic operations, possibly mixed with numbers or polynomials such as or 2*U ans = 2 + 2s 4 / s^2 1 - s 6 8 / s^3 1 P+T ans =

Typing the name of the matrix<br />

P<br />

now results in<br />

<strong>Polynomial</strong> matrix in s: 2-by-2, degree: 3<br />

P =<br />

Matrix coefficient at s^0 :<br />

1 0<br />

0 1<br />

Matrix coefficient at s^1 :<br />

1 0<br />

0 2<br />

Matrix coefficient at s^2 :<br />

0 1<br />

0 1<br />

Matrix coefficient at s^3 :<br />

0 0<br />

2 0<br />

Simple operations with polynomial matrices<br />

Addition,<br />

subtraction and<br />

multiplication<br />

In the <strong>Polynomial</strong> <strong>Toolbox</strong> polynomial matrices are objects <strong>for</strong> which all standard<br />

operations are defined.<br />

Define the polynomial matrices<br />

P = [ 1+s 2; 3 4], Q = [ s^2 1-s; s^3 1]<br />

P =<br />

Q =<br />

1 + s 2<br />

3 4<br />

s^2 1-s<br />

s^3 1<br />

<strong>The</strong> sum and product of P and Q follow easily:<br />

S = P+Q<br />

S =<br />

R = P*Q<br />

1 + s + s^2 3 - s<br />

3 + s^3 5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!