Chapter 1: Function Files
Matlab1 derives its power from its extensive capability of manipulating matrices. Therefore, this topic is discussed in the first section of this chapter. The name “Matlab” cames from Mat(rix) lab(oratory). Matlab programs are written in files with an .m extension. There are two kinds of m-files: script files and function files. The latter are much more interesting than the former. Script files are illustrated in Sec. 1.2 while function files are discussed in Sec. 1.3. See Moler (2011), which could be useful for the topics in Sec. 1.1.