title: How do sum two step responses of the same system in MATLAB?
body: <p>I'm trying to plot the response of a control system which has two unit steps - one a t=0 and one at t=0.3</p>
  
  <p>Here is the code I'm using:</p>
  
  <pre><code>% Set up the transfer function
  numer = [K*K_m*r];
  denom = [(L_m*J_e) (L_m*b_m+R_m*J_e) (K_b*K_m+R_m*b_m) K*K_m*r];
  transfun = tf(numer, denom);
  
  % Apply a step function at t=0
  [y,T] = step(transfun, 0:0.001:0.5);
  
  % Second step function at t=0.3
  [y_b, T_b] = step(transfun, 0.3:0.001:0.5);
  
  % How to add the above two outputs together?
  plot( ???? )
  </code></pre>
  
  <p>I've searched google, but the only solutions I can find are for systems with multiple inputs (MIMO). This system has only one input, I just want to use superposition principal to add them together.</p>
  
  <p>When I try adding the two vectors together I get "Vectors must be the same lengths."</p>