Skip to content

Commit 6f0417f

Browse files
committed
Fixed bugs in various calculations and orders of indices.
1 parent 6afeda8 commit 6f0417f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/lti.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ def __init__(self, inputs=1, outputs=1, dt=None):
6464
self.outputs = outputs
6565
self.dt = dt
6666

67+
# Test to see if a system is SISO
68+
def issiso(sys, strict=False):
69+
if isinstance(sys, (int, float, complex)) and not strict:
70+
return True
71+
elif not isinstance(sys, Lti):
72+
raise ValueError("Object is not an Lti system")
73+
74+
# Done with the tricky stuff...
75+
return sys.inputs == 1 and sys.outputs == 1
76+
6777
# Return the timebase (with conversion if unspecified)
6878
def timebase(sys, strict=True):
6979
"""Return the timebase for an Lti system

0 commit comments

Comments
 (0)