# .Modelica_LinearSystems2.StateSpace.'-'.negate

## Information

#### Syntax

```ss = StateSpace.'-'.negate(ss1)
```

#### Description

This operator function negates the state space system, i.e. the output ss is the negation ot the state space input ss1.

The operator is used by writing just the following command:

```ss := -ss1;
```

#### Example

```  StateSpace ss1 = StateSpace(A=[-1, 3; 0, -2], B=[1; 2], C=[0.2, 1], D=[0.17]);

StateSpace ss;

algorithm
ss := -ss1;
// ss.A = [-1, 3; 0, -2],
// ss.B = [1; 2],
// ss.C = [-0.2, -1],
// ss.D = [-0.17],
```

#### Interface

```function negate
import Modelica;
import Modelica_LinearSystems2.StateSpace;
input StateSpace ss "State-space system";
output StateSpace result(redeclare Real A[size(ss.A, 1), size(ss.A, 2)], redeclare Real B[size(ss.B, 1), size(ss.B, 2)], redeclare Real C[size(ss.C, 1), size(ss.C, 2)], redeclare Real D[size(ss.D, 1), size(ss.D, 2)]) "= -ss";
end negate;
```

Generated at 2021-01-19T02:00:07Z by OpenModelicaOpenModelica 1.17.0~dev-342-gcbdefcd using GenerateDoc.mos