MATLAB Functions Programming
摘要
The MATLAB codes discussed in the previous chapters are all interactive ones. If a set of interactive MATLAB codes is saved into a file, the file is then a MATLAB program. In this chapter, the structures of MATLAB programs and programming methods are presented. There are two types of files of MATLAB source programs. One is that the file composed of ASCII codeASCII code, containing a set of MATLAB statements. This type of file is referred to as an M-script fileM-script. Another type is the so-called MATLAB function file, to be discussed later. One thing in common for the two types of files is that, the suffix of the files is m. MATLAB function programming is demonstrated with examples, and some of the programming skills are explored.