Main Content


Detect data change from specified value in test step


hasChangedFrom(u,A) returns true if the value of u changes from the value A. Otherwise, hasChangedFrom returns false.


Detect Value Change From Specified Value

Detect if x has changed from a value of 15. This statement returns true when x had a value of 15 in the previous time step and has a value not equal to 15 in the current time step.



hasChangedFrom statements can be used in the Test Sequence and Test Assessment blocks and in Stateflow® charts.

Version History

Introduced in R2015a