In this chapter, you will learn the basic concepts of algorithms, M-files, selection structures, controlling mechanisms of the MATLAB language, and user-defined functions.
A computer program is basically a set of instructions that tells the computer what to do. In MATLAB, for larger programs, sometimes called scripts, using an editor is preferred to typing the whole code sequence at the prompt. The problems that we have dealt with so far have been easy to execute and accomplish. It was sufficient to use the prompt alone for solving the problems encountered up to this point. We could also use ...