% Script e5 Step response from G(s)
  clear % removes all variables from the workspace
  numG = [3 2]  % Create numerator
  denG = [2 4 5 1] % … & denominator polynomials
% Add pole at s=0 to G(s) to get transfer function of step response
  numstep = numG
  denstep = [denG 0]
  pause
  Gstep = tf(numstep,denstep) % create G(s)/s
  impulse(Gstep,20) % produce impulse response
  pause
  G = tf(numG,denG) % create the G(s) of initial system
  step(G,20)
  DC_gain = dcgain(G) % calculate DC gain – g(0)