what is function of break in this example?

Answers (1)

Gauri - break is used to terminate execution of the for loop. In this case, when the greatest comman divisor of 160 and x is one, then there is no need to continue intreating.
Try using the MATLAB debugger to step through the code and observe what happens.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

on 28 Oct 2015

Answered:

on 28 Oct 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!