
Control Structures,
Loops, and File Handling
After studying this chapter, you should be able to:
use conditional statements in programs
learn various loops, nested loops,
and conditional breaking of control
structures
learn file handling in MATLAB
®
4.1 Introduction
Logical decision-making and loops are two very important components in writing a computer
program. It is important to properly learn the syntax of conditional and loop structures. In this
chapter, conditional statements and loops in MATLAB are discussed.
Frequently, a user has to load data that is available in external fi les, perform certain com-
putations on it, and store the results ...