def testPole(self): """Test that the poles of drss outputs have less than unit magnitude.""" for states in range(1, self.maxStates): for inputs in range(1, self.maxIO): for outputs in range(1, self.maxIO): sys = matlab.drss(states, outputs, inputs) p = sys.pole() for z in p: self.assertTrue(abs(z) < 1)
def test_shape(self): """Test that drss outputs have the right state, input, and output size.""" for states in range(1, self.maxStates): for inputs in range(1, self.maxIO): for outputs in range(1, self.maxIO): sys = matlab.drss(states, outputs, inputs) self.assertEqual(sys.states, states) self.assertEqual(sys.inputs, inputs) self.assertEqual(sys.outputs, outputs)
def testDrss(self): """Call drss()""" drss(1) drss(2) drss(2, 1, 3)
def create_random_sys(mode, dim): sys_v = [] for i in range(0, mode): sys_v.append(mt.drss(dim[0], dim[0], dim[1])) return sys_v