Merge pull request #976 from henriks76/system-norms-doc · python-control/python-control@7a70be1

Original file line numberDiff line numberDiff line change

@@ -94,13 +94,13 @@ def norm(system, p=2, tol=1e-6, print_warning=True, method=None):

9494

Type of norm to be computed. ``p=2`` gives the H2 norm, and ``p='inf'`` gives the L-infinity norm.

9595

tol : float

9696

Relative tolerance for accuracy of L-infinity norm computation. Ignored

97-

unless p='inf'.

97+

unless ``p='inf'``.

9898

print_warning : bool

9999

Print warning message in case norm value may be uncertain.

100100

method : str, optional

101101

Set the method used for computing the result. Current methods are

102-

'slycot' and 'scipy'. If set to None (default), try 'slycot' first

103-

and then 'scipy'.

102+

``'slycot'`` and ``'scipy'``. If set to ``None`` (default), try ``'slycot'`` first

103+

and then ``'scipy'``.

104104
105105

Returns

106106

-------

@@ -114,10 +114,10 @@ def norm(system, p=2, tol=1e-6, print_warning=True, method=None):

114114

Examples

115115

--------

116116

>>> Gc = ct.tf([1], [1, 2, 1])

117-

>>> ct.norm(Gc, 2)

118-

0.5000000000000001

119-

>>> ct.norm(Gc, 'inf', tol=1e-11, method='scipy')

120-

1.000000000007276

117+

>>> round(ct.norm(Gc, 2), 3)

118+

0.5

119+

>>> round(ct.norm(Gc, 'inf', tol=1e-5, method='scipy'), 3)

120+

1.0

121121

"""

122122
123123

if not isinstance(system, (ct.StateSpace, ct.TransferFunction)):