0% found this document useful (0 votes)
17 views2 pages

Lab 1

The document contains 4 tasks involving polynomial operations and transfer function modeling in MATLAB. Task 1 defines polynomials, finds their roots, and constructs a transfer function. Task 2 defines a transfer function symbolically. Task 3 defines the same transfer function numerically. Task 4 finds the residue of a symbolic transfer function.

Uploaded by

Fahad Siddiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Lab 1

The document contains 4 tasks involving polynomial operations and transfer function modeling in MATLAB. Task 1 defines polynomials, finds their roots, and constructs a transfer function. Task 2 defines a transfer function symbolically. Task 3 defines the same transfer function numerically. Task 4 finds the residue of a symbolic transfer function.

Uploaded by

Fahad Siddiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Task-1

clc
clear all
close all
a=[1 5 30];
a1=roots(a)
b=[1 27 52];
b1=roots(b)
c=poly([-15 -26 -27]);
c1= 5 .* c
d=poly([0 -5 a1' -56 b1'])
H=tf(c1,d)
W=zpk(H)

Task-2
close all
clear all
clc
s=sym('s')
num=(5 *(s+27) *(s+26)* (s+15))
den=( (s) *(s+56) *(s^(2) + 27*(s) + 52)* (s+5) * (s^(2) + 5*(s) + 30) )
h=[num/den]

Task-3
close all
clear all
clc
s=tf('s')
n= (5 *(s+27) *(s+26)* (s+15)) / ((s) *(s+56) *(s^(2) + 27*(s) + 52)* (s+5) *
(s^(2) + 5*(s) + 30))

Task-4
close all
clear all
clc
s=sym('s')
n= ((s+5)*(s+70)) / ((s)*(s+45)*(s+5)*(s^(2) +7*s+10))
[num,den]=symdata(n)
[r,p,k]=residue(num,den)
num
den

You might also like