7.1. Introduction

The instructions given in a program are executed in the sequence in which they are written in a program. However, many times program application demands that the sequence of execution of the instructions be changed or a group of instructions be executed repeatedly depending upon some conditions. Control structures are provided in a computer language to take care of such needs of the program. Such a control structure may be used for testing a condition for true or false, repeated execution of group of statements or the selection of a group of statements out of several different available possibilities.

Like other programming languages, the MATLAB software also has different control structures for controlling the sequence of ...

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.