From c1f18689af280918800463873ec3eee9607d2c95 Mon Sep 17 00:00:00 2001 From: Hang Yu Date: Mon, 3 Oct 2022 13:47:29 -0700 Subject: [PATCH] Move sys._update_params(params) ahead of TimeResponseData return when ntates==0 --- control/iosys.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/control/iosys.py b/control/iosys.py index ce717c0fb..437c73d09 100644 --- a/control/iosys.py +++ b/control/iosys.py @@ -1779,6 +1779,9 @@ def input_output_response( else: noutputs = sys.noutputs + # Update the parameter values + sys._update_params(params) + # # Define a function to evaluate the input at an arbitrary time # @@ -1816,9 +1819,6 @@ def ufun(t): output_labels=sys.output_index, input_labels=sys.input_index, transpose=transpose, return_x=return_x, squeeze=squeeze) - # Update the parameter values - sys._update_params(params) - # Create a lambda function for the right hand side def ivp_rhs(t, x): return sys._rhs(t, x, ufun(t))