Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

db_0148: Flow chart patterns for conditions

ID: Title

db_0148: Flow chart patterns for conditions

Priority

Strongly recommended

Scope

MAAB

MATLAB Versions

All

Prerequisites

None

Description

Use the following patterns for conditions within Stateflow® flow charts:

Equivalent FunctionalityFlow Chart Pattern
One condition:
[condition] 

Up to three conditions, short form:

(The use of different logical operators in this form is not allowed. Use subconditions instead.)

[condition1 
&& condition2 
&& condition3]  
[condition1 
|| condition2 
|| condition3] 

Equivalent FunctionalityFlow Chart Pattern

Two or more conditions, multiline form:

(The use of different logical operators in this form is not allowed. Use subconditions instead.)

[condition1 ... 
&& condition2 ... 
&& condition3]  
[condition1 ...  
|| condition2 ... 
|| condition3] 

Conditions with subconditions:

(The use of different logical operators to connect subconditions is not allowed. The use of brackets is mandatory.)

[(condition1a 
|| condition1b) ... 
&& (condition2a 
|| condition2b) ... 
&& (condition3)]  
[(condition1a 
&& condition1b) ... 
|| (condition2a 
&& condition2b) ... 
|| (condition3)] 

Equivalent FunctionalityFlow Chart Pattern

Conditions that are visually separated:

(This form may be combined with the preceding patterns.)

[condition1 
&& condition2] 
[condition1 
|| condition2]

Rationale

  • Readability

Last Changed

V2.2

Model Advisor Check

Not applicable

Introduced in R2010a

Was this topic helpful?