operator function'=='

Check whether two state space systems have identical matrices

Information

Syntax

same = StateSpace.'=='(ss1, ss2)

Description

This operator function returns true, if all appropriate matrices of two state space systems ss1 and ss2 are identical. False is returned in any other case.

The operator is used by writing just the following command:

same := ss1 == ss2;

Example

  StateSpace ss1 = StateSpace(A=[-1, 0; 0, -2], B=[1; 2], C=[0, 1], D=[0]);
  StateSpace ss2 = StateSpace(A=[-3, 0; 0, -4], B=[3; 4], C=[0, 2], D=[0.2]);
  StateSpace ss3 = StateSpace(A=[-3, 0; 0, -4], B=[3; 4], C=[0, 2], D=[0.2]);

  ss1 == ss2;
// false

  ss2 == ss3;
// true

Inputs

TypeNameDefaultDescription
StateSpacess1State space system 1
StateSpacess2State space system 2
Realeps0Two elements e1 and e2 of the two systems are identical if abs(e1-e2) <= eps

Outputs

TypeNameDefaultDescription
Booleansame=true, if the two systems are identical