This book is an essential and comprehensive guide for students, professionals, and enthusiasts who want to explore and master MATLAB, a powerful platform for numerical computation, graphical visualization, and computational development.
Starting with the fundamentals of the language, the reader is led through a solid pedagogical progression that includes flow control, matrix manipulation, 2D and 3D graphics, scripts and functions, culminating in advanced applications in optimization, artificial intelligence, neural networks, deep learning, reinforcement learning, and modeling with Simulink.
With a practical and accessible approach, reinforced by real examples and progressive exercises, this work offers an effective learning curve, preparing the reader to face academic and professional challenges in the MATLAB universe.
1 Introduction
1.1 MATLAB Windows
1.2 Variables
1.3 Basic Arithmetic Operations in MATLAB
1.4 Rounding
1.5 Logical Operators
1.6 Relational Operators
1.7 Trigonometric Functions
2 Flow Control
2.1 Introduction
2.2 IF conditional statement
2.3 Repetitive statement FOR
2.4 Repetitive statement WHILE
2.5 Case selection SWITCH
2.6 Statement TRY-CATCH
2.7 Exercises
3 Matrices and Structures
3.1 Introduction
3.2 Data Types
3.3 Creating multidimensional matrices
3.4 Size and dimension of matrices
3.5 Pre-allocation of matrices
3.6 Concatenation of matrices
3.8 Modifying the shape of a matrix
3.9 Indexing multidimensional matrices
3.10 Manipulation of real or complex number matrices
3.11 Exercises
4 Plots and Graphs
4.1 Introduction
4.2 Components of a Graph
4.3 2-D Graphs
4.4 3-D Graphs
4.5 Surface Graphs
4.6 Function subplot
4.7 Exercises
5 M-Files
5.1 Scripts
5.2 Functions
5.3 Exercises
6 Optimization
6.1 Introduction
6.2 Formulation and Optimization Process
6.3 Classification of Optimization Problems
6.4 Optimization Tools in MATLAB
6.5 Practical Examples in MATLAB
6.6 Comprehensive Practical Example
6.7 Multiobjective and Advanced Optimization
6.8 Proposed Exercises
7 Neural Networks
7.1 Neural Networks in MATLAB
7.2 Theoretical Introduction
7.3 Data Preparation and Preprocessing
7.4 Types of Neural Networks in MATLAB
7.5 Mathematical Operation and Training Algorithms
7.6 Practical Example: Classification with Feedforward Network
7.7 Training, Validation, and Regularization
7.8 Recurrent Networks and Time Series
7.9 Visualization and Interpretation of Results
7.10 Frequently Asked Questions and Tips
7.11 Advanced Examples and Case Studies
7.12 Conclusion
7.13 Proposed Exercises
8 Deep Learning: Advanced Techniques and Applications
8.1 Introduction to Advanced Deep Learning in MATLAB
8.2 Evolution and State of the Art of Deep Learning
8.3 Deep and Modern Architectures
8.4 Advanced Training and Regularization Techniques
8.5 Transfer Learning and Fine-Tuning
8.6 Deployment, Optimization and Edge AI
8.7 Explainability, Ethics and Security in Deep Learning
8.8 Integration with Other Languages and Frameworks
8.9 Current Challenges and Future of Deep Learning
8.10 Advanced Case Studies
8.11 Proposed Exercises
9 Reinforcement Learning: Concepts, Methods, and Applications
9.1 Introduction
9.2 Fundamental Concepts
9.3 Models and Formalisms
9.4 Classical RL Algorithms
9.5 Deep Reinforcement Learning
9.6 Professional Workflow with MATLAB
9.7 Advanced Applications
9.8 Parallelization, Deployment and Integration
9.9 Current Challenges and Future Trends
9.10 Practical Tips and Best Practices
9.11 Proposed Exercises
10 Symbolic Math
10.1 Introduction to Symbolic Mathematics in MATLAB
10.2 Fundamentals of the Symbolic Math Toolbox
10.3 Advanced Symbolic Algebra
10.4 Symbolic Differential Calculus
10.5 Symbolic Integral Calculus
10.6 Limits, Series, and Approximations
10.7 Equations and Systems
10.8 Symbolic Linear Algebra
10.9 Transforms
10.10Applications in Physics and Engineering
10.10.4Control
10.11Applications in Financial Mathematics
10.12Visualization of Symbolic Expressions
10.13Advanced Techniques and Optimization
10.14Export and Integration
10.15Complete Case Studies
10.16Tips, Tricks, and Best Practices
10.17Proposed Exercises
10.18Appendix: Symbolic Mathematics Functions
11 Signal Processing
11.1 Introduction to Signal Processing in MATLAB
11.2 Fundamentals of Signals and Systems
11.3 Representation and Visualization of Signals in MATLAB
11.4 Transforms in Signal Processing
11.5 Signal Filtering
11.6 Spectral and Statistical Analysis of Signals
11.7 Digital Audio Processing
11.8 System Identification and Modeling
11.9 Advanced Applications and Real-Time Processing
11.10Proposed Exercises
11.10.3Advanced Exercises
11.11Best Practices and Optimization in MATLAB
12 Image Processing
12.1 Introduction to Image Processing in MATLAB
12.2 Fundamentals of Digital Images
12.3 Basic Operations with Images
12.4 Geometric Transformations
12.5 Color and Contrast Manipulation
12.6 Filtering and Smoothing
12.7 Edge Detection
12.8 Image Segmentation
12.9 Mathematical Morphology
12.10Region and Object Analysis
12.11Frequency Domain Transformations
12.12Object Recognition and Detection
12.13Advanced Applications
12.14Development of User Interfaces (GUIs)
12.15Proposed Exercises
12.16Best Practices and Tips
13 Numerical Methods and Scientific Computing
13.1 Introduction to Numerical Mathematics
13.2 Numerical Errors and Stability
13.3 Solving Nonlinear Equations
13.4 Systems of Linear Equations
13.5 Interpolation and Approximation
13.6 Numerical Integration
13.7 Ordinary Differential Equations
13.8 Numerical Optimization
13.9 Proposed Exercises
13.10Best Practices in Numerical Computation
14 Control Systems and Simulink
14.1 Introduction to Control Systems with MATLAB and Simulink
14.2 System Modeling in Simulink
14.3 Controller Design in Simulink
14.4 Simulation of Non-Linear and Multi-Domain Systems
14.5 Real-Time Implementation and Simulation
14.6 Practical Example: Design of a DC Motor Speed Control System185
14.7 Proposed Exercises
14.8 Best Practices in Modeling and Simulation with Simulink
15 Review Exercises
15.1 Proposed Exercises
A Appendices
A.1 Appendix I
Author’s Note
Recommended Reading
Filipe Azevedo is an Associate Professor at ISEP, Polytechnic of Porto, and an integrated researcher at INESC TEC – Institute for Systems and Computer Engineering, Technology and Science. He holds a Bachelor’s and Master’s degree in Electrical and Computer Engineering from the Faculty of Engineering of the University of Porto, and received his PhD in Electrical and Computer Engineering from the University of Trás-os-Montes e Alto Douro with distinction and honors.
He began his professional career at EFACEC Energia in the technical-commercial area, before dedicating himself to teaching and research in higher education. Since 2000, he has been teaching at ISEP, where he has been developing work in the areas of energy systems, artificial intelligence, and engineering economics.
His research at INESC TEC focuses mainly on modeling and optimization of smart electrical networks, electricity markets, integration of renewable sources, and the application of decision support techniques. His interests also extend to energy security, cryptography, and cybersecurity, with particular attention to the impact of these technologies in strategic contexts.
With more than two decades of academic and scientific experience, he has sought to articulate pedagogical practice with applied research, developing innovative solutions and training engineers with critical thinking and technological vision.