Matlab: An Introduction

By Thomas Haigh
301
2026

Description

MATLAB is a very popular language for technical computing used by students, engineers, and scientists in universities, research institutes, and industries all over the world. The software is popular because it is powerful and easy to use. For university freshmen in it can be thought of as the next tool to use after the graphic calculator in high school. This book is written with the objective to write a book that teaches the software in a friendly, non-intimidating fashion. Therefore, the book is written in simple and direct language. The book includes numerous sample problems in mathematics, science, and engineering that are similar to problems encountered by new users of MATLAB. Highlighting the new aspects of MATLAB and expanding on many existing features this text shows you how to solve problems in science, engineering, and mathematics. Many numerical methods are available for the solutions of the response of dynamic systems. We have discussed several widely used step-by-step numerical integration methods for linear dynamic response analysis. A brief description of these integration methods is presented and their application is illustrated. The integration schemes considered were three explicit and four implicit methods. They are the explicit schemes (the central difference method, two-cycle interaction with trapezoidal rule and fourth order Runge-Kutta method) and the implicit schemes (Houbolt method, Wilson Theta method, Newmark Beta method and the Park Stiffly stable method). Application of these direct numerical integration methods is illustrated with a case study of a linear dynamic system. The main objective of this book is to provide the students with the opportunity to improve their programming skills using the MATLAB environment to implement algorithms and to teach the use of MATLAB as a tool in solving problems in engineering. This book includes the coverage of basics of MATLAB and application of MATLAB software to solve problems in electrical circuits, control systems, numerical methods, optimization, direct numerical integration methods in engineering. With this foundation of basic MATLAB applications in engineering problem solving, the book provides opportunities to explore advanced topics in application of MATLAB as a tool.

About Author

Thomas Haigh professor of mathematics and computer at the University of Michigan, Stanford University, and the University of New Mexico is an American mathematician and computer programmer specializing in numerical analysis. He received his bachelor's degree from California Institute of Technology and a Ph.D. from Stanford University, both in mathematics. He worked for Charles Lawson at the Jet Propulsion Laboratory for some time. He received an honorary degree of Doctor of Mathematics from the University of Waterloo in 2011. He was appointed Honorary Doctor (doctor technices, honoris causa) at the Technical University of Denmark. In 2009, he was recognized by Society for Industrial and Applied Mathematics as a SIAM Fellow for his outstanding contributions to numerical analysis and software, including MATLAB.

Table of Content

Preface
Chapter 1. Getting Started with MATLAB

What is MATLAB?
Installing and Launching MATLAB
MATLAB Desktop Environment Overview
The Command Window and Command History
Chapter 2. MATLAB Syntax and Variables
Rules for Naming Variables
Data Types (Double, Char, Logical, etc.)
Operators in MATLAB (Arithmetic, Relational, Logical)
Constants and Special Values (pi, inf, NaN)
Chapter 3. Working with Matrices
Matrix Creation and Initialization
Matrix Operations (Addition, Subtraction, Multiplication)
Transpose, Inverse, and Determinant
Identity and Zero Matrices
Indexing and Slicing Matrices
Chapter 4. Control Flow and Loops
Conditional Statements (if, elseif, else)
Switch-Case Control Structures
For Loops and Nested Loops
While Loops
Chapter 5. Functions and Modular Programming
Defining Functions in MATLAB
Function Inputs and Outputs
Local vs Global Variables
Function Handles and Anonymous Functions
Nested Functions

Chapter 6. Data Input and Output
Reading from Text and CSV Files
Writing Data to Files
Importing Excel Data
Saving and Loading MAT-Files
User Input with input()
File and Folder Management Functions
Chapter 7. Plotting and Visualization
Creating 2D Plots (plot, fplot)
Customizing Plots (titles, labels, legends)
legend([ h2], {‘Set A’, ‘Set B’});
Multiple Plots in One Figure (subplot, hold on)
Bar, Pie, and Histogram Plots
3D Plots (mesh, surf, plot3)
Chapter 8. MATLAB for Linear Algebra
Solving Systems of Linear Equations
Matrix Factorizations (LU, QR, SVD)
Eigenvalues and Eigenvectors
Dot and Cross Product
Norms and Condition Numbers
Chapter 9. MATLAB for Calculus
Symbolic Differentiation and Integration
Limits and Series
Partial Derivatives
Solving Equations Symbolically
Bibliography