control.matlab.negate

control.matlab.negate(sys)[source]

Return the negative of a system.

Parameters

sys (StateSpace, TransferFunction or FRD) –

Returns

out

Return type

StateSpace or TransferFunction

Notes

This function is a wrapper for the __neg__ function in the StateSpace and TransferFunction classes. The output type is the same as the input type.

Examples

>>> G = ct.tf([2], [1, 1])
>>> G.dcgain()
2.0
>>> Gn = ct.negate(G) # Same as sys2 = -sys1.
>>> Gn.dcgain()
-2.0