control.matlab.negate
- control.matlab.negate(sys)[source]
Return the negative of a system.
- Parameters
sys (scalar, array, or
InputOutputSystem
) – I/O systems to negate.- Returns
out – Negated system.
- Return type
scalar, array, or
InputOutputSystem
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