1
课程详述
COURSE SPECIFICATION
以下课程信息可能根据实际授课需要或在课程检讨之后产生变动。如对课程有任何疑问,请
联系授课教师。
The course information as follows may be subject to change, either during the session because of unforeseen
circumstances, or following review of the course at the end of the session. Queries about the course should be
directed to the course instructor.
1.
课程名称 Course Title
Matlab 程序设计基础 Introduction to Matlab Programming
2.
授课院系
Originating Department
计算机科学与工程系 Department of Computer Science and Engineering
3.
课程编号
Course Code
CS113
4.
课程学分 Credit Value
3
5.
课程类别
Course Type
通识必修课程 General Education (GE)Required Courses
6.
授课学期
Semester
秋季 Fall
春季 Spring
7.
授课语言
Teaching Language
英文、中文或者两者相结合。
English, or Chinese, or both
8.
他授课教师)
Instructor(s), Affiliation&
Contact
For team teaching, please list
all instructors
崔书墨,数学系,cuism@sustech.edu.cn
Shumo Cui, Department of Mathematics, cuism@sustech.edu.cn,
魏艳,机械与能源工程系,weiy@sustech.edu.cn
Yan Wei, Department of Mechanical and Energy Engineering, weiy@sustech.edu.cn
9.
实验员/属学系、
方式
Tutor/TA(s), Contact
10.
选课人数限额(可不填)
Maximum Enrolment
Optional
2
11.
讲授
Lectures
习题/辅导/讨论
Tutorials
实验/实习
Lab/Practical
其它(请具体注明)
OtherPlease specify
总学时
Total
32
0
32
0
64
12.
先修课程、其它学习要求
Pre-requisites or Other
Academic Requirements
None
13.
后续课程、其它学习规划
Courses for which this course
is a pre-requisite
14.
其它要求修读本课程的学系
Cross-listing Dept.
None
教学大纲及教学日历 SYLLABUS
15.
教学目标 Course Objectives
MATLAB是美国 MathWorks公司出品的商业数学软件,主要面对科学计算、可视化以及交互式程序设计的高科技计算环
境。它将数值分析、矩阵计算、科学数据可视化以及非线性动态系统的建模和仿真等诸多强大功能集成在一个易于使用的
视窗环境中,为科学研究、工程设计以及必须进行有效数值计算的众多科学领域提供了一种全面的解决方案。
本课程将介绍 MATLAB 的基本概念、方法、技巧和常见误区,为学生在科学计算、数据分析、仿真建模等领域使用
MATLAB打下基础。
MATLAB is a commercial mathematics software developed by MathWorks in the United States. It mainly faces a high-
tech computing environment of scientific computing, visualization and interactive programming. It integrates many
powerful functions, such as numerical analysis, matrix calculation, scientific data visualization, and nonlinear dynamic
system modeling and simulation, in an easy-to-use window environment, and is used for scientific research, engineering
design, and many sciences that must carry out effective numerical calculations.
This course will introduce the basic concepts, methods, tricks and common misunderstandings in MATLAB, and lay a
foundation for students to use MATLAB in the fields of scientific computing, data analysis, simulation modeling and so
on.
16.
预达学习成果 Learning Outcomes
通过本课程,学生将掌握 MATLAB 的算术符号、数据类型、向量运算、数据输入输出、循环语句、脚本命令和函数、
殊数据结构、特殊函数、绘图和图形命令、面向对象编程、图形用户界面等内容,并在完成作业过程中和实验课上积累一
定的 MATLAB 程序设计经验。
Through this course, students will master the basic concepts, theories and methods of partial differential equations,
master the physical background and mathematical derivation of transportation equation, heat equation, Laplace
equation, Poisson equation and wave equation. Master the characteristic method, variable separation method, energy
method, basic solution method, Green's function method and d'Alembert formula. Master the principle of maximum and
minimum and its application. Understand the differences between linear and nonlinear equations.
17.
课程内容及教学日 (如授课语言以英文为主,则课程内容介绍可以用英文;如团队教学或模块教学,教学日历须注明
主讲人)
Course Contents (in Parts/Chapters/Sections/Weeks. Please notify name of instructor for course section(s), if
this is a team teaching or module course.)
3
理论课部分(共 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 学时):数据结构。本章介绍了两种主要的数据结构:元胞数组和结构体。还会引入更复杂的数据结构,例如
4
嵌套结构和结构向量。
Chapter 7: Data Structures: Cell Arrays and Structures introduces two main data structures: cell arrays and structures.
Once structures are covered, more complicated data structures such as nested structures and vectors of structures are
also introduced.
8 章(4 学时):高级函数。本章涵盖了函数的更高级特性和类型,例如匿名函数、嵌套函数和递归函数。介绍了函数
句柄、匿名函数和函数函数使用。引入了函具有可量的输入和/或输出参数的概念这是使用元数组实现的
本章的几个示例中也使用了字符串函数。
Chapter 8: Advanced Functions covers more advanced features of and types of functions, such as anonymous
functions, nested functions, and recursive functions. Function handles and their use both with anonymous functions and
function functions are introduced. The concept of having a variable number of input and/or output arguments to a
function is introduced; this is implemented using cell arrays. String functions are also used in several examples in this
chapter.
9 章(4 学时):面向对象编程和图形简介。从 R2014b 版本开始,所有绘图对象都是实际对象。本章介绍了使用绘图
对象,并借此介绍面向对象编程 (OOP) 概念和术语,然后扩展到如何编写自己的类定义和创建自己的对象。
Chapter 9: Introduction to Object-Oriented Programming and Graphics As of version R2014b, all plot objects are actual
objects. This chapter introduces Object-Oriented Programming (OOP) concepts and terminology using plot objects and
then expands to how to write your own class definitions and create your own objects.
10 章(2 学时):高级绘图技术。本章继续详细介绍第 3 章中介绍的绘图函数。介绍了不同的二维绘图类型,例如对
数刻度图、饼图和直方图,以及使用元胞数组和字符串函数自定义绘图。演示了三维绘图函数以及一些为指定对象创建
标的函数。涵盖了 Graphics 的概念,并介绍了一些图形属性,如线宽和颜色。演示了核心图形对象及其在更高级别绘图
函数中的使用。涉及从文件读取数据然后绘图的应用程序使用元胞数组和字符串函数。
Chapter 10: Advanced Plotting Techniques continues with more on the plot functions introduced in Chapter 3. Different
two-dimensional plot types, such as logarithmic scale plots, pie charts, and histograms are introduced, as is customizing
plots using cell arrays and string functions. Three-dimensional plot functions as well as some functions that create the
coordinates for specified objects are demonstrated. The notion of Graphics is covered, and some graphics properties
such as line width and color are introduced. Core graphics objects and their use by higher-level plotting functions are
demonstrated. Applications that involve reading data from files and then plotting use both cell arrays and string
functions.
课程项目(6 学时):本课程将包含多个课程项目,综合地考察和训练学生编写程序。
Projects: Several projects will be given which challenge the students’ skill in MATLAB programming.
实验课部分(共32学时)
1 章(2 学时):MATLAB 安装与简介。本章简述 MATLAB 安装步骤及可能遇到的问题,练习使用各个 MATLAB
面环境,练习使用变量、赋值语句和类型,涵盖数学和关系表达式和其中使用的运算符,以及字符、随机数、内置函数和
帮助浏览器的使用。
Chapter 1: MATLAB installation and introduction. This chapter describes the MATLAB installation steps and possible
problems, exercises using various MATLAB desktop environments, exercises using variables, assignment statements,
and types, covers mathematical and relational expressions and the operators used in them, as well as the use of
characters, random numbers, built-in functions, and help browsers.
2 章(2 学时):向量和矩阵。练习向量和矩阵的创建和操作,练习数组运算和矩阵运算(如矩阵乘法)。涵盖使用向
量和矩阵作为函数参数以及专门为向量和矩阵编写的函数。本章重点是向量化代码中有用的逻辑向量。
5
Chapter 2: Vectors and matrices. Practice vector and matrix creation and manipulation, array operations and matrix
operations (such as matrix multiplication). Covers functions that use vectors and matrices as function parameters and
functions written specifically for vectors and matrices. This chapter focuses on useful logical vectors in vectorization
code.
3 章(2 学时):MATLAB 编程。本章练习编写算法和脚本。包括练习简单的输入和输出以及注释。使用脚本来创建
和定制简单的绘图以及进行文件输入和输出。最后,练习使用用户定义函数。
Chapter 3: MATLAB programming. This chapter practices writing algorithms and scripts. Includes exercises for simple
input and output and comments. Use scripts to create and customize simple drawings and file input and output. Finally,
practice using user-defined functions.
4 章(2 学时):选择语句。本章练习在带有 else elseif 语句的 if 语句中使用逻辑表达式。还包括 switch 语句,以
及从菜单中进行选择的代码编码。此外,还涵盖了返回逻辑真或假的函数。
Chapter 4: Select statement. This chapter practices using logical expressions in if statements with else and elseif
statements. It also includes the switch statement, and the code encoding for selecting from the menu. In addition, it
covers functions that return logical true or false.
5 章(4 学时):练习循环语句和向量化代码。本章练习使用计数 (for) 和条件 (while) 循环。例如求和和计数。练习使
用嵌套循环。演示一些更复杂的循环使用,例如错误检查和组合循环和选择语句。
Chapter 5: Practice loop statements and vectorization code. This chapter practices using count (for) and condition
(while) loops. Such as summation and counting. Practice using nested loops. Demonstrates some of the more complex
uses of loops, such as error checking and combining loops and select statements.
6 章(4 学时):MATLAB 程序。本章练习用户定义函数。练习引入了返回多个值且不返回任何值的用户定义函数。
练习使用局部函数和变量范围,以及一些调试技术。
Chapter 6: MATLAB program. This chapter practices user-defined functions. The exercise introduces user-defined
functions that return multiple values and none. Practice using local functions and variable scopes, and some debugging
techniques.
7 章(2 学时):数据结构。本章练习两种主要的数据结构:元胞数组和结构体。演示引入更复杂的数据结构,例如嵌
套结构和结构向量。
Chapter 7: Data structure. This chapter exercises two main types of data structures: cell arrays and structures. The
demo introduces more complex data structures, such as nested structures and structure vectors.
8 章(4 学时):高级函数。本章练习使用函数的更高级特性和类型,例如匿名函数、嵌套函数和递归函数。
Chapter 8: High-level functions. This chapter practices using more advanced features and types of functions, such as
anonymous functions, nested functions, and recursive functions.
9 章(4 学时):面向对象编程和图形简介。本章练习使用绘图对象,练习如何编写自己的类定义和创建自己的对象。
Chapter 9: Introduction to object-oriented programming and graphics. This chapter exercises with drawing objects, and
exercises how to write your own class definitions and create your own objects.
10 章(2 学时):高级绘图技术。练习不同的二维绘图类型,例如对数刻度图、饼图和直方图,以及使用元胞数组和
字符串函数自定义绘图。练习三维绘图函数以及一些为指定对象创建坐标的函数。练习从文件读取数据然后绘图的应用
序使用元胞数组和字符串函数。
Chapter 10: Advanced drawing techniques. Practice different 2D plotting types, such as logarithmic scale plots, pie
charts, and histograms, as well as custom plotting using cell arrays and string functions. Practice 3D drawing functions
6
and some functions that create coordinates for a given object. Applications that practice reading data from files and then
drawing use cell arrays and string functions.
课程项目(6 学时):本课程将包含多个课程项目,综合地考察和训练学生编写程序。
Projects: Several projects will be given which challenge the students’ skill in MATLAB programming.
18.
教材及其它参考资 Textbook and Supplementary Readings
教材 Textbook:
1.MATLAB 编程与工程应用(第二版) Stormy Attaway , 鱼滨, 赵元哲等译
参考书 Reference:
1. MATLAB 之父:编程实践,Cleve Moler 著,薛定宇译。
2. MATLAB 编程指南,付文利, 刘刚编著。
课程评估 ASSESSMENT
19.
评估形式
Type of
Assessment
评估时间
Time
占考试总成绩百分
% of final
score
违纪处罚
Penalty
备注
Notes
出勤 Attendance
10%
课堂表现
Class
Performance
小测验
Quiz
课程项目 Projects
10 hours
10%
平时作业
Assignments
3 hours per week
30%
期中考试
Mid-Term Test
期末考试
Final Exam
2 hours
50%
期末报告
Final
Presentation
其它(可根据需要
改写以上评估方
式)
Others (The
above may be
modified as
necessary)
20.
记分方式 GRADING SYSTEM
A. 十三级等级制 Letter Grading
B. 二级记分制(通过/不通过) Pass/Fail Grading
7
课程审批 REVIEW AND APPROVAL
21.
本课程设置已经过以下责任人/委员会审议通过
This Course has been approved by the following person or committee of authority