“Introduction to MATLAB and Practical Applications: Video Teaching Edition”
01
Content of the Book
The book “Introduction to MATLAB and Practical Applications: Video Teaching Edition” is based on MATLAB R2024a and focuses on MATLAB programming, computational and simulation analysis knowledge. It comprehensively explains various methods and techniques for MATLAB engineering applications, accompanied by material files, result files, PPT courseware, teaching videos, exercise answers, and teaching outlines.
The book is divided into 12 chapters, covering 211 small examples, 9 comprehensive cases, 39 beginner Q&As, and 1 comprehensive case, thoroughly explaining the basic knowledge and application cases of MATLAB software. The content includes an introduction to MATLAB, basic MATLAB, programming basics, graphics drawing, graphics and image processing, advanced mathematical calculations, systems of equations, symbolic computation, graphical user interface design, basics of Simulink simulation, mathematical statistics analysis, and time-domain analysis design examples of control systems. This book introduces the meaning of MATLAB configuration parameters through examples, with a gradual arrangement of content, detailed steps, making it easy for users to master the methods for setting relevant parameters.
02
Authors of the Book
Xu Haifeng, PhD in Management, currently an associate professor at the School of Information Technology and Engineering, Guangzhou Business School. He has served as a master’s supervisor in management and systems analysis disciplines. He has completed multiple courses at the undergraduate and graduate levels and has completed 25 research projects (14 of which he led); he has published 77 academic papers in various academic journals and conferences (including 19 in core journals), authored 2 monographs, and participated in compiling various textbooks.
Li Yongjian, PhD in Mechanical Engineering, currently an associate professor in a teaching and research office at the Shijiazhuang campus of the Army Engineering University. He has led or participated in 58 provincial and ministerial research projects, received 2 second-class and 16 third-class awards for technological progress at the ministry level. He has published 32 high-level papers and authored 9 works.
03
Target Audience of the Book
The book “Introduction to MATLAB and Practical Applications: Video Teaching Edition” is suitable for beginners in MATLAB, personnel in numerical analysis and numerical computation, engineering designers, and data analysts. It can also serve as a textbook for related courses in higher education institutions or vocational colleges.
04
Table of Contents
Scroll up to view
Table of Contents
Chapter 1 Introduction to MATLAB 1
1.1 Overview of Scientific Computing in MATLAB 1
1.1.1 Development History of MATLAB 1
1.1.2 MATLAB System 2
1.2 User Interface of MATLAB 2024 2
1.2.1 Title Bar 3
1.2.2 Ribbon 3
1.2.3 Toolbar 5
1.2.4 Command Window 5
1.2.5 Command History Window 7
1.2.6 Current Folder Window 8
1.2.7 Workspace Window 9
1.2.8 Figure Window 10
1.3 Setting Search Path 11
1.3.1 Viewing Search Path 11
1.3.2 Extending Search Path 12
1.4 MATLAB Help System 13
1.4.1 Online Help System 13
1.4.2 Help Commands 14
1.4.3 Online Demonstration System 17
1.5 Beginner Q&A 19
1.6 Hands-on Experiment 19
1.7 Thoughts and Exercises 20
Chapter 2 Basic Knowledge of MATLAB 21
2.1 Composition of MATLAB Commands 21
2.1.1 Basic Symbols 21
2.1.2 Functional Symbols 23
2.1.3 Common Keyboard Operations 24
2.2 Data Types 25
2.2.1 Variables and Constants 25
2.2.2 Numbers 26
2.2.3 Characters and Strings 30
2.2.4 Vectors 32
2.2.5 Matrices 34
2.2.6 Cell Arrays 41
2.2.7 Structures 43
2.3 Operators 44
2.3.1 Arithmetic Operators 45
2.3.2 Relational Operators 45
2.3.3 Logical Operators 46
2.4 Numerical Operations 46
2.4.1 Matrix Operations 46
2.4.2 Vector Operations 54
2.5 M-files 56
2.5.1 Script Files 58
2.5.2 Function Files 59
2.6 Example Operation – Determining if a Matrix is Diagonalizable 60
2.7 Beginner Q&A 62
2.8 Hands-on Experiment 63
2.9 Thoughts and Exercises 64
Chapter 3 Basics of Programming 66
3.1 MATLAB Programming 66
3.1.1 Expressions, Expression Statements, and Assignment Statements 66
3.1.2 Program Structure 67
3.1.3 Controlling Program Flow 72
3.1.4 Human-Computer Interaction Statements 73
3.1.5 Debugging Commands in MATLAB 75
3.2 Function Handles 76
3.2.1 Creating Function Handles 76
3.2.2 Viewing Function Handle Properties 77
3.2.3 Calling Function Handles 78
3.3 Function Variables and Their Scope 78
3.4 Subfunctions and Private Functions 79
3.5 Auxiliary Functions in Programming 79
3.6 File Call Records 81
3.6.1 Profile Function 81
3.6.2 Displaying Call Record Results 82
3.7 Example Operation – Horizontally Connecting Matrices 84
3.8 Beginner Q&A 85
3.9 Hands-on Experiment 86
3.10 Thoughts and Exercises 87
Chapter 4 Graphics Drawing 88
4.1 Drawing 2D Curves 88
4.1.1 Drawing 2D Graphics 88
4.1.2 Multiple Graphics Display 93
4.1.3 Drawing Function Graphics 95
4.2 Setting Graphics Properties 97
4.2.1 Properties of Figure Windows 97
4.2.2 Coordinate Systems and Axes 102
4.2.3 Graphics Annotations 104
4.3 3D Plotting 109
4.3.1 3D Curve Plotting Functions 109
4.3.2 3D Mesh Functions 113
4.3.3 3D Surface Functions 116
4.3.4 Cylindrical and Spherical Surfaces 118
4.3.5 Contour Lines of 3D Graphics 120
4.4 3D Graphics Modification 126
4.4.1 Perspective Handling 126
4.4.2 Color Handling 128
4.4.3 Lighting Handling 132
4.5 Example Operation – Drawing a 3D View of a Function 136
4.6 Beginner Q&A 138
4.7 Hands-on Experiment 139
4.8 Thoughts and Exercises 141
Chapter 5 Graphics and Image Processing 142
5.1 Vector Graphics 142
5.2 Image Processing and Animation Demonstration 146
5.2.1 Reading and Writing Images 146
5.2.2 Displaying Images and Querying Information 147
5.2.3 Animation Demonstration 151
5.3 Example Operation – Curve Drawing Animation 153
5.4 Beginner Q&A 154
5.5 Hands-on Experiment 155
5.6 Thoughts and Exercises 157
Chapter 6 Advanced Mathematical Calculations 158
6.1 Sequences 158
6.1.1 Summation of Sequences 159
6.1.2 Product of Sequences 162
6.2 Series 166
6.3 Limits and Derivatives 167
6.3.1 Limits 168
6.3.2 Derivatives 169
6.4 Integrals 170
6.4.1 Definite and Improper Integrals 170
6.4.2 Indefinite Integrals 171
6.4.3 Multiple Integrals 172
6.5 Integral Transforms 174
6.5.1 Fourier Integral Transform 174
6.5.2 Inverse Fourier Transform 175
6.5.3 Fast Fourier Transform 176
6.5.4 Laplace Transform 178
6.5.5 Inverse Laplace Transform 179
6.6 Complex Functions 180
6.6.1 Taylor Expansion 180
6.6.2 Fourier Expansion 182
6.7 Example Operation – Gaussian Pulse Time-Domain and Frequency-Domain Conversion 184
6.8 Beginner Q&A 185
6.9 Hands-on Experiment 185
6.10 Thoughts and Exercises 186
Chapter 7 Systems of Equations 188
7.1 Operations on Equations 188
7.1.1 Introduction to Systems of Equations 188
7.1.2 Solutions of Equations 189
7.2 Solving Linear Systems of Equations 190
7.2.1 Definition of Linear Systems of Equations 190
7.2.2 Solving Using Matrix Operations 192
7.2.3 Solving Using Matrix Decomposition 196
7.2.4 Non-negative Least Squares Solution 200
7.3 Solving Nonlinear Equations (Systems) 201
7.3.1 Nonlinear Equations 201
7.3.2 Nonlinear Systems of Equations 203
7.4 Partial Differential Equations 204
7.4.1 Introduction to Partial Differential Equations 204
7.4.2 Region Setup and Meshing 205
7.4.3 Setting Boundary Conditions 208
7.4.4 Solving PDEs 209
7.4.5 Solving Eigenvalue Equations 212
7.5 Example Operation – Solving Delay Differential Equation Systems 214
7.6 Beginner Q&A 215
7.7 Hands-on Experiment 216
7.8 Thoughts and Exercises 217
Chapter 8 Symbolic Computation 219
8.1 Symbols and Numbers 219
8.1.1 Conversion Between Symbols and Numbers 219
8.1.2 Setting Precision for Symbols and Numbers 220
8.2 Symbolic Matrices 221
8.2.1 Creating Symbolic Matrices 221
8.2.2 Other Operations on Symbolic Matrices 224
8.2.3 Simplifying Symbolic Polynomials 226
8.3 Multivariable Function Analysis 228
8.3.1 Jacobian Matrix 228
8.3.2 Gradient of Real Matrices 230
8.4 Example Operation – Hilbert Matrix 231
8.5 Beginner Q&A 233
8.6 Hands-on Experiment 234
8.7 Thoughts and Exercises 235
Chapter 9 Graphical User Interface Design 236
9.1 GUI Development Environment 236
9.2 Designing GUI in MATLAB Environment 239
9.2.1 Creating Container Components 239
9.2.2 Creating UI Components 244
9.2.3 Designing Menus 246
9.3 Using Design View 248
9.3.1 Design Environment 248
9.3.2 Placing Components 251
9.3.3 Setting Component Properties 252
9.3.4 Adding Context Menus 254
9.4 Code View 258
9.4.1 Editing Environment 259
9.4.2 Managing Callbacks 259
9.4.3 Callback Parameters 261
9.4.4 Managing Auxiliary Functions 261
9.4.5 Managing Properties 263
9.5 Beginner Q&A 266
9.6 Hands-on Experiment 267
9.7 Thoughts and Exercises 269
Chapter 10 Basics of Simulink Simulation 270
10.1 Introduction to Simulink 270
10.1.1 Characteristics of Simulink Models 271
10.1.2 Data Types in Simulink 273
10.2 Simulink Module Library 274
10.2.1 Common Module Libraries 275
10.2.2 Subsystems and Their Encapsulation 278
10.3 Creating Simulation Models 283
10.3.1 Creating Model Files 283
10.3.2 Basic Operations on Modules 284
10.3.3 Setting Module Parameters 286
10.3.4 Connecting Modules 288
10.4 Simulation Analysis 291
10.4.1 Setting Simulation Parameters 291
10.4.2 Running and Analyzing Simulations 293
10.4.3 Diagnosing Simulation Errors 302
10.5 Zero-Crossing Detection 303
10.6 Algebraic Loops 304
10.7 Callback Functions 305
10.8 S-Functions 306
10.8.1 Workflow of S-Functions 307
10.8.2 Writing S-Functions 308
10.9 Example Operation – Simulation of a Pendulum System 309
10.10 Beginner Q&A 315
10.11 Hands-on Experiment 316
10.12 Thoughts and Exercises 316
Chapter 11 Mathematical Statistics Analysis 318
11.1 Basics of Mathematical Statistics in MATLAB 318
11.1.1 Sample Mean 318
11.1.2 Sample Variance and Standard Deviation 319
11.1.3 Covariance and Correlation Coefficient 320
11.2 Curve Fitting 321
11.2.1 Polynomial Fitting 322
11.2.2 Least Squares Fitting of Lines 323
11.2.3 Least Squares Curve Fitting 324
11.3 Regression Analysis 327
11.3.1 Simple Linear Regression 327
11.3.2 Multiple Linear Regression 328
11.3.3 Partial Least Squares Regression 328
11.4 Example Operation – Estimating World Population 331
11.5 Beginner Q&A 333
11.6 Hands-on Experiment 333
11.7 Thoughts and Exercises 334
Chapter 12 Control System Analysis and Design Examples 336
12.1 Analysis of Control Systems 336
12.1.1 Simulation Analysis of Control Systems 336
12.1.2 Closed-Loop Transfer Functions 337
12.2 Response Analysis of Closed-Loop Transfer Functions 338
12.2.1 Step Response Curves 338
12.2.2 Impulse Response Curves 339
12.2.3 Ramp Response 339
12.3 Stability Analysis of Control Systems 340
12.3.1 State Space Implementation 340
12.3.2 Stability 341
05
Features of the Book
(1) Covers common tools and commands in MATLAB R2024a, combining real workplace cases, selecting practical functions, making it easy for beginners to get started.
(2) Analyzes 211 small examples, 9 comprehensive exercises, 39 beginner Q&As, and 1 industry application case, combined with “hands-on experiments” and “thoughts and exercises” to help readers easily learn MATLAB operation methods and techniques.
(3) Accompanied by material files, result files, PPT courseware, teaching videos, and exercise answers.
This article is excerpted from “Introduction to MATLAB and Practical Applications: Video Teaching Edition”, published with the authorization of the publisher and authors.