Skip to content

norm added to the sphinx documentation #976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions control/sysnorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ def norm(system, p=2, tol=1e-6, print_warning=True, method=None):
Type of norm to be computed. ``p=2`` gives the H2 norm, and ``p='inf'`` gives the L-infinity norm.
tol : float
Relative tolerance for accuracy of L-infinity norm computation. Ignored
unless p='inf'.
unless ``p='inf'``.
print_warning : bool
Print warning message in case norm value may be uncertain.
method : str, optional
Set the method used for computing the result. Current methods are
'slycot' and 'scipy'. If set to None (default), try 'slycot' first
and then 'scipy'.
``'slycot'`` and ``'scipy'``. If set to ``None`` (default), try ``'slycot'`` first
and then ``'scipy'``.

Returns
-------
Expand All @@ -114,10 +114,10 @@ def norm(system, p=2, tol=1e-6, print_warning=True, method=None):
Examples
--------
>>> Gc = ct.tf([1], [1, 2, 1])
>>> ct.norm(Gc, 2)
0.5000000000000001
>>> ct.norm(Gc, 'inf', tol=1e-11, method='scipy')
1.000000000007276
>>> round(ct.norm(Gc, 2), 3)
0.5
>>> round(ct.norm(Gc, 'inf', tol=1e-5, method='scipy'), 3)
1.0
"""

if not isinstance(system, (ct.StateSpace, ct.TransferFunction)):
Expand Down
1 change: 1 addition & 0 deletions doc/control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Utility functions and conversions
issys
mag2db
modal_form
norm
observable_form
pade
reachable_form
Expand Down