functionnegate
Unary minus (state space system where the output is multiplied by a gain of -1)
Information
Syntax
ss = StateSpace.'-'.negate(ss1)
Description
This operator function negates the state space system, i.e. the output ss is the negation of 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],
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | ss | State-space system |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | result | = -ss |