% Script e2 Create G(s) as ZPK object
  clear % removes all variables from the workspace
  numG = [4 36 32]  % Create numerator
  denG = [1 10 30 40 24] % … & denominator polynomials
  G = tf(numG,denG) % create TF object
  pause
% Convert G(s) into ZPK object 
  GG = zpk(G)
  pause
 [zz,pp,kk] = zpkdata(GG,'v') %Extract poles and zeros from ZPK form
  pause
  [z,p,k] = zpkdata(G,'v') %Extract poles and zeros from TF form
  pause
  pzmap(GG);grid
  title('Ex 2: pole-zero map from ZP object')
  
