理论课部分(共 32 学时)
第 1 章(2 学时):MATLAB 简介。本章介绍 MATLAB 桌面环境。引入变量、赋值语句和类型。涵盖数学和关系表达式
和其中使用的运算符,以及字符、随机数、内置函数和帮助浏览器的使用。
Chapter 1: Introduction to MATLAB begins by covering the MATLAB Desktop Environment. Variables, assignment
statements, and types are introduced. Mathematical and relational expressions and the operators used in them are
covered, as are characters, random numbers, and the use of built-in functions and the Help browser.
第 2 章(2 学时):向量和矩阵。本章介绍向量和矩阵的创建和操作。解释数组运算和矩阵运算(如矩阵乘法)。涵盖使
用向量和矩阵作为函数参数以及专门为向量和矩阵编写的函数。本章重点是向量化代码中有用的逻辑向量。
Chapter 2: Vectors and Matrices introduces creating and manipulating vectors and matrices. Array operations and
matrix operations (such as matrix multiplication) are explained. The use of vectors and matrices as function arguments
and functions that are written specifically for vectors and matrices are covered. Logical vectors and other concepts
useful in vectorizing code are emphasized in this chapter.
第 3 章(2 学时):MATLAB 编程简介。本章介绍算法和脚本的思想。这包括简单的输入和输出以及注释。使用脚本来
创建和定制简单的绘图以及进行文件输入和输出。最后,引入用户定义函数的概念。
Chapter 3: Introduction to MATLAB Programming introduces the idea of algorithms and scripts. This includes simple
input and output, and commenting. Scripts are then used to create and customize simple plots and to do file input and
output. Finally, the concept of a user-defined function is introduced with only the type of function that calculates and
returns a single value.
第 4 章(2 学时):选择语句。本章介绍在带有 else 和 elseif 语句的 if 语句中使用逻辑表达式。还包括 switch 语句,以
及从菜单中进行选择的概念。此外,还涵盖了返回逻辑真或假的函数。
Chapter 4: Selection Statements introduces the use of logical expressions in if statements, with else and elseif clauses.
The switch statement is also demonstrated, as is the concept of choosing from a menu. Also, functions that return
logical true or false are covered.
第 5 章(4 学时):循环语句和向量化代码。本章介绍了计数 (for) 和条件 (while) 循环的概念。涵盖了许多常见用途,例
如求和和计数。还引入了嵌套循环。还介绍了一些更复杂的循环使用,例如错误检查和组合循环和选择语句。最后,演示
了通过在向量和矩阵上使用内置函数和运算符而不是循环遍历的向量化代码。重点介绍了编写高效代码的技巧,并介绍了
分析代码的工具。
Chapter 5: Loop Statements and Vectorizing Code introduces the concepts of counted (for) and conditional (while)
loops. Many common uses such as summing and counting are covered. Nested loops are also introduced. Some more
sophisticated uses of loops such as error-checking and combining loops and selection statements are also covered.
Finally, vectorizing code, by using built-in functions and operators on vectors and matrices instead of looping through
them, is demonstrated. Tips for writing efficient code are emphasized, and tools for analyzing code are introduced.
第 6 章(4 学时):MATLAB 程序。本章包含更多关于脚本和用户定义函数的内容。引入了返回多个值且不返回任何值
的用户定义函数。 MATLAB 中程序的概念通常由调用用户定义函数的脚本组成,并通过示例进行演示。还介绍了局部函
数和变量范围,以及一些调试技术。
Chapter 6: MATLAB Programs covers more on scripts and user-defined functions. User-defined functions that return
more than one value and also that do not return anything are introduced. The concept of a program in MATLAB, which
normally consists of a script that calls user-defined functions, is demonstrated with examples. A longer menu-driven
program is shown as a reference. Local functions and scope of variables are also introduced, as are some debugging
techniques.
第 7 章(2 学时):数据结构。本章介绍了两种主要的数据结构:元胞数组和结构体。还会引入更复杂的数据结构,例如