@@ -449,7 +449,7 @@ def forced_response(sys, T=None, U=0., X0=0., transpose=False,
|
449 | 449 | if U.ndim == 1: |
450 | 450 | U = np.append(U, U[-1]) |
451 | 451 | else: |
452 | | -U = np.append(U, U[:, -1], 1) |
| 452 | +U = np.append(U, U[:, -1:], 1) |
453 | 453 | |
454 | 454 | else: |
455 | 455 | sys_dt = dt # For unspecified sampling time, use time incr |
@@ -472,7 +472,8 @@ def forced_response(sys, T=None, U=0., X0=0., transpose=False,
|
472 | 472 | xout = np.transpose(xout) |
473 | 473 | yout = np.transpose(yout) |
474 | 474 | |
475 | | -return _process_time_response(sys, tout, yout, xout, transpose=transpose, |
| 475 | +return _process_time_response(sys, tout[:n_steps], yout[:, :n_steps], |
| 476 | +xout[:, :n_steps], transpose=transpose, |
476 | 477 | return_x=return_x, squeeze=squeeze) |
477 | 478 | |
478 | 479 | |
|