diff --git a/control/freqplot.py b/control/freqplot.py index 961f499b3..2f0bcea28 100644 --- a/control/freqplot.py +++ b/control/freqplot.py @@ -2468,6 +2468,14 @@ def _determine_omega_vector(syslist, omega_in, omega_limits, omega_num, """ omega_range_given = True + if omega_in is None: + for sys in syslist: + if isinstance(sys, FrequencyResponseData): + # FRD already has predetermined frequencies + if omega_in is not None and not np.all(omega_in == sys.omega): + raise ValueError("List of FrequencyResponseData systems can only have a single frequency range between them") + omega_in = sys.omega + if omega_in is None: if omega_limits is None: omega_range_given = False diff --git a/control/tests/frd_test.py b/control/tests/frd_test.py index 987121987..25ecc5e21 100644 --- a/control/tests/frd_test.py +++ b/control/tests/frd_test.py @@ -192,6 +192,8 @@ def testNyquist(self): # plt.savefig('/dev/null', format='svg') plt.figure(2) freqplot.nyquist(f1, f1.omega) + plt.figure(3) + freqplot.nyquist(f1) # plt.savefig('/dev/null', format='svg') @slycotonly pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy