7.3. Branches Control Structures

The branch control structures allow selecting and executing specific blocks of statements out of many statement blocks depending upon the condition. These include different types of if structures, switch control structure and so on. The if structure is a conditional control structure which allows some group of statements to be executed only if the given condition is true.

7.3.1. if Control Structures

In if control structure, a group of statements are executed only if the condition is true. The following are the different forms of if control structures: if Structure

This is the simplest form of if control structure. It has only ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.