0% found this document useful (0 votes)
51 views12 pages

Some More MATLAB Commands .: NG (1 1) DG (1 2) Printsys (NG, DG) Printsys (NG, DG)

The document demonstrates various MATLAB commands for analyzing and plotting systems including: printing a transfer function from numerator and denominator polynomials; finding the roots of polynomials; creating a pole-zero map; performing closed loop analysis; and plotting the step response of a system. Key steps include printing the transfer function, finding the poles and zeros, creating a pole-zero map, performing closed loop analysis to find new poles and zeros, and plotting the step response of a system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views12 pages

Some More MATLAB Commands .: NG (1 1) DG (1 2) Printsys (NG, DG) Printsys (NG, DG)

The document demonstrates various MATLAB commands for analyzing and plotting systems including: printing a transfer function from numerator and denominator polynomials; finding the roots of polynomials; creating a pole-zero map; performing closed loop analysis; and plotting the step response of a system. Key steps include printing the transfer function, finding the poles and zeros, creating a pole-zero map, performing closed loop analysis to find new poles and zeros, and plotting the step response of a system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Some more MATLAB

commands .
>> ng = [1 1]; dg =[1 2];
>> printsys (ng,dg)

num/den =

S + 1
S + 2
>>

>> z = roots(ng)
z =
-1

>> p = roots(dg)
p =
-2
>>

>>pzmap(ng,dg)
>>title(pole-zero map)

>>[nt,dt] =
cloop(ng,dg,-1)
>>zc = roots(nt)
zc =
-1

>>pc = roots(dt)
pc = -1.5
>>

>>ng = [1];
dg = [1 1 1];
>>p = roots(dg)
p=
-0.5 + j 0.866
-0.5 - j 0.866

>>t = [0:0.5:10];
>>[y,x,t] = step(ng,dg,t);
>>plot(t,y), grid

>>xlabel(Time[sec])
>>ylabel(output)

You might also like