7.4. Summary

  • In this chapter, conditional and unconditional looping has been discussed.

  • In conditional looping, the number of repetitions is not known and loop continues till the condition is satisfied, whereas in unconditional looping the number of repetitions is known and loop is repeated only for the fixed number of iterations.

  • The control structures are classified as (i) Looping control structures, such as for loop, nested for loop, and while loop, and (ii) branching control structures if-else and switch-case structures have been illustrated using examples.

  • The special statements used to change the sequence of looping such as break, continue, error have also been discussed and illustrated using examples.

    • break is used to end the for or while ...

Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.