@@ -124,25 +124,30 @@ def frequency_response(self, omega, squeeze=True):
124124
125125 G(exp(j*omega*dt)) = mag*exp(j*phase).
126126
127+ In general the system may be multiple input, multiple output (MIMO), where
128+ `m = self.inputs` number of inputs and `p = self.outputs` number of
129+ outputs.
130+
127131 Parameters
128132 ----------
129- omega : array_like or float
133+ omega : float or array_like
130134 A list, tuple, array, or scalar value of frequencies in
131135 radians/sec at which the system will be evaluated.
132- squeeze: bool, optional (default=True)
133- If True and sys is single input, single output (SISO), return a
134- 1D array or scalar depending on omega's length .
136+ squeeze : bool, optional (default=True)
137+ If True and the system is single input single output (SISO), i.e. `m=1`,
138+ `p=1`, return a 1D array rather than a 3D array .
135139
136140 Returns
137141 -------
138- mag : (self.outputs, self.inputs , len(omega)) or len(omega) ndarray
142+ mag : (p, m , len(omega)) ndarray or ( len(omega),) ndarray
139143 The magnitude (absolute value, not dB or log10) of the system
140- frequency response.
141- phase : (self.outputs, self.inputs, len(omega)) or len(omega) ndarray
144+ frequency response. Array is ``(len(omega), )`` if
145+ and only if system is SISO and ``squeeze=True``.
146+ phase : (p, m, len(omega)) ndarray or (len(omega),) ndarray
142147 The wrapped phase in radians of the system frequency response.
143148 omega : ndarray
144149 The (sorted) frequencies at which the response was evaluated.
145-
150+
146151 """
147152 omega = np .sort (np .array (omega , ndmin = 1 ))
148153 if isdtime (self , strict = True ):
@@ -463,7 +468,9 @@ def evalfr(sys, x, squeeze=True):
463468 Evaluate the transfer function of an LTI system for complex frequency x.
464469
465470 Returns the complex frequency response `sys(x)` where `x` is `s` for
466- continuous-time systems and `z` for discrete-time systems.
471+ continuous-time systems and `z` for discrete-time systems, with
472+ `m = sys.inputs` number of inputs and `p = sys.outputs` number of
473+ outputs.
467474
468475 To evaluate at a frequency omega in radians per second, enter
469476 ``x = omega * 1j`` for continuous-time systems, or
@@ -474,17 +481,17 @@ def evalfr(sys, x, squeeze=True):
474481 ----------
475482 sys: StateSpace or TransferFunction
476483 Linear system
477- x: complex scalar or array_like
484+ x : complex scalar or array_like
478485 Complex frequency(s)
479- squeeze: bool, optional (default=True)
480- If True and sys is single input single output (SISO), returns a
481- 1D array or scalar depending on the length of x .
486+ squeeze : bool, optional (default=True)
487+ If True and ` sys` is single input single output (SISO), i.e. `m=1`,
488+ `p=1`, return a 1D array rather than a 3D array .
482489
483490 Returns
484491 -------
485- fresp : (sys.outputs, sys.inputs , len(x)) or len(x) complex ndarray
486- The frequency response of the system. Array is len(x) if and only if
487- system is SISO and squeeze=True.
492+ fresp : (p, m , len(x)) complex ndarray or ( len(x),) complex ndarray
493+ The frequency response of the system. Array is ``( len(x), )`` if
494+ and only if system is SISO and `` squeeze=True`` .
488495
489496 See Also
490497 --------
@@ -493,8 +500,8 @@ def evalfr(sys, x, squeeze=True):
493500
494501 Notes
495502 -----
496- This function is a wrapper for StateSpace.__call__ and
497- TransferFunction.__call__.
503+ This function is a wrapper for :meth:` StateSpace.__call__` and
504+ :meth:` TransferFunction.__call__` .
498505
499506 Examples
500507 --------
@@ -510,25 +517,31 @@ def evalfr(sys, x, squeeze=True):
510517def freqresp (sys , omega , squeeze = True ):
511518 """
512519 Frequency response of an LTI system at multiple angular frequencies.
520+
521+ In general the system may be multiple input, multiple output (MIMO), where
522+ `m = sys.inputs` number of inputs and `p = sys.outputs` number of
523+ outputs.
513524
514525 Parameters
515526 ----------
516527 sys: StateSpace or TransferFunction
517528 Linear system
518- omega: float or array_like
529+ omega : float or array_like
519530 A list of frequencies in radians/sec at which the system should be
520531 evaluated. The list can be either a python list or a numpy array
521532 and will be sorted before evaluation.
522- squeeze: bool, optional (default=True)
523- If True and sys is single input, single output (SISO), returns
524- 1D array or scalar depending on omega's length .
533+ squeeze : bool, optional (default=True)
534+ If True and ` sys` is single input, single output (SISO), returns
535+ 1D array rather than a 3D array .
525536
526537 Returns
527538 -------
528- mag : (sys.outputs, sys.inputs , len(omega)) or len(omega) ndarray
539+ mag : (p, m , len(omega)) ndarray or ( len(omega),) ndarray
529540 The magnitude (absolute value, not dB or log10) of the system
530- frequency response.
531- phase : (sys.outputs, sys.inputs, len(omega)) or len(omega) ndarray
541+ frequency response. Array is ``(len(omega), )`` if and only if system
542+ is SISO and ``squeeze=True``.
543+
544+ phase : (p, m, len(omega)) ndarray or (len(omega),) ndarray
532545 The wrapped phase in radians of the system frequency response.
533546 omega : ndarray
534547 The list of sorted frequencies at which the response was
@@ -541,8 +554,8 @@ def freqresp(sys, omega, squeeze=True):
541554
542555 Notes
543556 -----
544- This function is a wrapper for StateSpace.frequency_response and
545- TransferFunction.frequency_response.
557+ This function is a wrapper for :meth:` StateSpace.frequency_response` and
558+ :meth:` TransferFunction.frequency_response` .
546559
547560 Examples
548561 --------
0 commit comments