Question 6 Here is some Matlab code that uses this system to illustrate the Matlab functions tf, zpk, zero, pole, tfdata

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 6 Here is some Matlab code that uses this system to illustrate the Matlab functions tf, zpk, zero, pole, tfdata

Post by answerhappygod »

Question 6 Here Is Some Matlab Code That Uses This System To Illustrate The Matlab Functions Tf Zpk Zero Pole Tfdata 1
Question 6 Here Is Some Matlab Code That Uses This System To Illustrate The Matlab Functions Tf Zpk Zero Pole Tfdata 1 (23.35 KiB) Viewed 43 times
Question 6 Here Is Some Matlab Code That Uses This System To Illustrate The Matlab Functions Tf Zpk Zero Pole Tfdata 2
Question 6 Here Is Some Matlab Code That Uses This System To Illustrate The Matlab Functions Tf Zpk Zero Pole Tfdata 2 (55.49 KiB) Viewed 43 times
Question 6 Here Is Some Matlab Code That Uses This System To Illustrate The Matlab Functions Tf Zpk Zero Pole Tfdata 3
Question 6 Here Is Some Matlab Code That Uses This System To Illustrate The Matlab Functions Tf Zpk Zero Pole Tfdata 3 (11.81 KiB) Viewed 43 times
Question 6 Here is some Matlab code that uses this system to illustrate the Matlab functions tf, zpk, zero, pole, tfdata, isstable, printsys, and pzmap: 8P2a 8 Use the transfer function 8 8H(s) = 2 (s+1) (8-2) (s+2) (s+3) (S-1) 8 to illustrate the Matlab functions tf, zpk, zero, 8 pole, tfdata, isstable, printsys, and pzmap. clear; z = [-1 2]; - Re(s) > 1 [-2 -3 1]; P g = 2; H1 zpk (z,p,g) 8zeros (roots of numerator) poles (roots of denominator) transfer function gain zero-pole-gain system model
* convert to transfer function system model * Get the numerator and denominator polynomial coefficients [numer, denom] = tfdata (H1, 'v') Do it again with the other model 8 [numer, denom] = tfdata (H2, 'v') H2 = tf (H1) 8 Compute a transfer function system model from the numer and denom coefficients 8 H3 = tf (numer, denom) H3 is the same as H1 8 Convert to zero-pole-gain system model 8 H4 = zpk (H3) H4 is the same as H1 Use the numer and denom coefficients to 8 print the transfer function to the 8 Matlab command window printsys (numer, denom) Use the pole function to get the poles 8 from system models H1 and H2 8 P = pole (H1) p = pole (H2) 8 same result as the line above Use the zero function to get the zeros 8 from system models H1 and H2 8 z zero (H1) z = zero (H2) 8 same result as the line above 8 8 Use pzmap to get the poles and zeros 8 [p z] = pzmap (H1) [p z]= pzmap (H2) same result as the line above. 8 & Generate a pole-zero plot in three different ways 8 figure (1); pzmap (H1) ; figure (2); pzmap (H2); figure (3); pzmap (numer, denom); 8 8 Use isstable to show that the system is unstable 8 isstable (H1) 8 * Use residue to compute a partial fraction expansion. Notice that we don't have to multiply out the denominator by hand.
[r p k] = residue (numer, denom) Let's see what variables we have: (a) Type in the code and run it. You can type it in line-by-line at the command prompt or you can create an m-file. Don't forget to include the pole-zero plots in your turn-in file. (b) Use the [r p k] values returned by residue to find the impulse response h(t).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply