Skip to content

Commit 6d55d57

Browse files
committed
fix bug calculating kmax
1 parent d4cbc95 commit 6d55d57

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

control/rlocus.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,8 @@ def _k_max(num, den, real_break_points, k_break_points):
227227
kmax_asymp = -den(farthest_points) / num(farthest_points)
228228
else:
229229
kmax_asymp = [den.coeffs[0] / num.coeffs[0] * 3]
230-
if np.max(kmax_asymp) == 0:
231-
kmax = np.max(np.concatenate((np.real(kmax_asymp), k_break_points), axis=0))
232-
else:
233-
kmax = kmax_asymp
230+
231+
kmax = np.max(np.concatenate((np.real(kmax_asymp), k_break_points), axis=0))
234232
return kmax
235233

236234

0 commit comments

Comments
 (0)