Activity 4 - Gilay

You might also like

You are on page 1of 8

ECE 408

Control System Laboratory

Activity 4 POLYNOMIALS

Rovic James M. Gilay BSME - 3

Name Course & Year

P4 7:30 – 10:30 ENGR. LOTIS P. PATUNOB

Section Time Instructor

PROBLEMS:

1. Find the roots of 6𝑠4 + 8𝑠3 + 9𝑠2 − 5𝑠 + 3 = 0 and assign it to M1.

Commands
disp("Find the roots of 6s^4 + 8s^3 + 9s^2 − 5s + 3 = 0 and assign it to M1");
M1 = poly([3 -5 9 8 6], 's', 'c')
disp(M1); disp(roots(M1));

Answers

3 -5s +9s² +8s³ +6s⁴

-0.9370637 + 1.1906435i

-0.9370637 - 1.1906435i

0.270397 + 0.3803709i

0.270397 - 0.3803709i

2. Find the roots of M2 = 8𝑠3 + 9𝑠2 + 3 = 0 and reassemble M2 from its roots.

Commands
disp("Find the roots of M2 = 8s^3 + 9s^2 + 3 = 0 and reassemble M2 from its roots.");

M2 = poly([3 0 9 8],'s','c');
disp(M2); rM2 =
roots(M2);
disp(rM2);
M3 = (poly(rM2,'s'))*8;
disp(M3);
Answers

3 +9s² +8s³

-1.3353126 + 0.i

0.1051563 + 0.5193989i 0.1051563 - 0.5193989i

3 +1.332D-15s +9s² +8s³

3. Display P3 as product of (2𝑠4 + 4𝑠3 + 3𝑠2 + 5𝑠 + 1) (𝑠3 + 3𝑠2 − 𝑠 + 3).

Commands
disp("Display P3 as product of (2s^4 + 4s^3 + 3s^2 + 5s + 1) (s^3 + 3s^2 − s + 3).");

P1 = poly([1 5 3 4 2],'s','c'); P2
= poly([ 3 -1 3 1],'s','c');
disp(P1); disp(P2);
P3=P1*P2;
disp(P3);
Answers
1 +5s +3s² +4s³ +2s⁴

3 -s +3s² +s³

3 +14s +7s² +25s³ +16s⁴ +13s⁵ +10s⁶ +2s⁷

4. Expand the polynomial M4 = (2𝑠4 + 4𝑠3 + 3𝑠2 + 5𝑠 + 1) (𝑠3 + 3𝑠2 − 𝑠 + 3) and evaluate
at s = 3.

Commands
disp("Expand the polynomial M4 = (2s^4 + 4s^3 + 3s^2 + 5s + 1) (s^3 + 3s^2 − s + 3) and evaluate
at s = 3.");

disp(P3);
P4 = horner(P3,3);
disp(P4);
Answers

3 +14s +7s² +25s³ +16s⁴ +13s⁵ +10s⁶ +2s⁷

= 16902

5. Express the given function F(s) in terms of a numerator polynomial divided by a


denominator polynomial.
𝟐
𝟔(𝒔 +𝟓𝒔+𝟐)
a. 𝑭𝟏(𝒔) =
𝒔(𝒔+𝟑)(𝒔−𝟏)

Commands
disp("Problem 5a");

s=%s;
num = 6*poly([2 5 1],'s','c');
den = s*(s+3)*(s-1); F1 =
num/den ; disp(F1);
Answers

12 +30s +6s²
---------------- -3s +2s² +s³

b. 𝑭𝟐(𝒔) = 𝟏𝟐 (𝒔+𝟐)(𝒔+𝟓)
( 𝒔+𝟑)(𝒔+𝟓)

Commands
disp("Problem 5b")

num = 12*(s+2)*(s+5);
den = (s+3)*(s+5); F2=
num/den ;
disp(F2);

Answers

24 +12s
-----------
3 +s
6. Give the partial expansion of the following functions:

𝟐
𝟔𝒔 +𝟓𝒔+𝟕

a. 𝑭𝟑(𝒔𝒔)(𝒔 =+𝟑 )(𝟐𝒔𝟐+ 𝟓𝒔−𝟏)

Commands

Answers

𝟒
𝟖 (𝒔+𝟏𝟐)(𝒔+𝟓)
b. 𝑭𝟒(𝒔𝒔)( 𝒔=+ 𝟏)(𝒔+𝟑)(𝟑𝒔𝟐+𝟐𝒔+𝟏)

Commands

Answers

You might also like