Javatpoint Logo
Javatpoint Logo

MATLAB while loop

The while loop repeatedly executes statements while a specified statement is true.

Syntax:

Example1:

Output:

The random number equivalent to 10 found at 36 step

Example2:

Output:

value of a: 10
value of a: 11
value of a: 12
value of a: 13
value of a: 14
value of a: 15
value of a: 16
value of a: 17
value of a: 18
value of a: 19

Next TopicMATLAB Nested Loop




Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA