Skip to content

Commit 80bd3d5

Browse files
committed
added small checks for return_x argument in step
1 parent 6dfd5a5 commit 80bd3d5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

control/tests/test_control_matlab.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ def test_step(self):
145145
t, y = step(sys, T, X0)
146146
plot(t, y)
147147

148+
# Test output of state vector
149+
t, y, x = step(sys, return_x=True)
150+
148151
#Test MIMO system
149152
A, B, C, D = self.make_MIMO_mats()
150153
sys = ss(A, B, C, D)

control/tests/timeresp_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def test_step_response(self):
6666
np.testing.assert_array_almost_equal(yout, youttrue, decimal=4)
6767
np.testing.assert_array_almost_equal(tout, t)
6868

69+
tout, yout, xout = step_response(sys, T=t, X0=0, return_x=True)
70+
np.testing.assert_array_almost_equal(yout, youttrue, decimal=4)
71+
np.testing.assert_array_almost_equal(tout, t)
72+
6973
# Test MIMO system, which contains ``siso_ss1`` twice
7074
sys = self.mimo_ss1
7175
_t, y_00 = step_response(sys, T=t, input=0, output=0)

0 commit comments

Comments
 (0)