%% Evaluate Piecewise-Linear Bound on Phase Plane Trajectory
% Create a default requirement object.

Requirement = sdo.requirements.PhasePlaneRegion;

% The requirement object specifies the bounding region as a single edge extending from (-1,0) to (-1,1) in the phase plane defined by two signals. Requirement.Type has the default value of '<='. This value implies the area to the left of the edge is out of bounds, where the forward direction is the direction of creation of the edge.
%
% Specify the test signal data as timeseries objects.

signal1 = timeseries(1-exp(-(0:10)'));
signal2 = timeseries(sin((0:10)'));

%
% Evaluate the requirement.

Evaluation = evalRequirement(Requirement,signal1,signal2)

% A negative value indicates that the requirement is satisfied, and the phase plane trajectory of the two test signal data is in the bounding region.
% Copyright 2012 The MathWorks, Inc.