While Loop
Iteratively execute child components while a specified condition is true
Description
This component iteratively executes its child components while a specified condition
is true. The While Loop
component must have at least one child
component; the purpose of this component is to run its children several times. If it
does not have any children, this component does not add anything to the report.
Tip
Limit the number of repetitions to prevent infinite loops.
Logic Properties
Continue looping if this expression is true: Specifies an expression to evaluate. This expression must be a valid MATLAB® expression that evaluates to
1
or0
(true
orfalse
).For example, if
a
=1
,b
=2
, andc
=3
, the following command:returns:d=(a>b/c)
Becaused = 1
1
is greater thanb/c
(2/3
), this expression istrue
and evaluates to1
.Limit number of loops to: Allows you to prevent infinite loops. Use the left and right arrows to increase or decrease the number of loops.
Initialize with this expression: Initializes the loop with a valid MATLAB expression.
Insert Anything into Report?
Yes, if it has a child component.
Class
rptgen_lo.clo_while
See Also
For Loop
, Logical Else
, Logical Elseif
, Logical If
, Logical Then