March 2020
Intermediate to advanced
318 pages
9h 59m
English
Flow control is a useful way to control the execution of computer statements. As for any programming language, loop, conditional, switch, and trial structures are supported in MATLAB. In this chapter, various flow control possibilities are introduced and demonstrated with examples.
In Section 4.1, two kinds of loop structure are introduced. Iterative methods and vectorized programming are demonstrated, and the eventual target of the latter one is to replace loops, so as to construct high efficiency programs. Conditional structures are presented in Sections 4.2. Piecewise vectorized programming method is also introduced, so as to replace a structure variable to create high efficiency programs. In ...
Read now
Unlock full access