| Stateflow User's Guide | ![]() |
Types of Model Coverage in Embedded MATLAB Functions
During simulation, the following Embedded MATLAB block function statements are tested for Decision Coverage:
if-- Decision coverage is 100% if the if expression evaluates to true at least once and false at least once.
switch-- Decision coverage is 100% if every switch case is taken, including the fall-through case.
for-- Decision coverage is 100% if the equivalent loop condition evaluates to true at least once, and false at least once.
while -- Decision coverage is 100% if the equivalent loop condition evaluates to true at least once, and false at least once.
During simulation, the following logical conditions are tested for Condition Coverage and MCDC in the Embedded MATLAB block function:
| Model Coverage for an Embedded MATLAB Function | Creating a Model with Embedded MATLAB Function Decisions | ![]() |
© 1994-2005 The MathWorks, Inc.