O'Reilly logo

Programming in MATLAB ® by Ram N. Patel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4

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 files, perform certain computations on it, and store the results in output files. Such file handling exercises form an important part of MATLAB programming since ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required