Programming and Engineering Computing with MATLAB 2022

by Huei-Huang Lee, NCKU, Taiwan

 

Contents


Chapter 1  Getting Started, Desktop Environment, and Overview

    1.1    Start and Quit MATLAB

    1.2    Entering Commands

    1.3    Array Expressions

    1.4    Data Visualization: Line Plots

    1.5    MATLAB Scripts

    1.6    Data Visualization: Surface Plots

    1.7    Symbolic Mathematics

    1.8    Live Script Editor

    1.9    Screen Text Input/Output

    1.10    Text File Input/Output

    1.11    Debug Your Programs

    1.12    Binary File Input/Output

    1.13    Images and Sounds

    1.14    Flow Controls

    1.15    User-Defined Functions

    1.16    Cell Arrays

    1.17    Structures

    1.18    Graphical User Interfaces (GUI)

    1.19    GUIDE

    1.20    App Designer


Chapter 2  Data Types, Operators, and Expressions

    2.1    Unsigned Integers

    2.2    Signed Integers

    2.3    Floating-Point Numbers

    2.4    Character and Strings

    2.5    Logical Data

    2.6    Arrays

    2.7    Sums, Products, Minima, and Maxima

    2.8    Arithmetic Operators

    2.9    Relational and Logical Operators

    2.10    String Manipulations

    2.11    Expressions

    2.12    Example: Function Approximations

    2.13    Example: Series Solution of a Laplace Equation

    2.14    Example: Deflection of Beams

    2.15    Example: Vibrations of Supported Machines

    2.16    Additional Exercise Problems


Chapter 3  Flow Controls, Functions, and Programs

   3.1    If-Blocks

    3.2    Switch-Blocks

    3.3    While-Loops

    3.4    For-Loops

    3.5    User-Defined Functions

    3.6    Subfunctions

    3.7    Nested Functions

    3.8    Function Handles

    3.9    Anonymous Functions

    3.10    Function Precedence Order

    3.11    Program Files

    3.12    Example: Deflection of Beams

    3.13    Example: Sorting and Searching

    3.14    Example: Statically Determinate Trusses (Version 1.0)

    3.15    Example: Statically Determinate Trusses (Version 2.0)

    3.16    Additional Exercise Problems


Chapter 4  Cell Arrays, Structures, Tables, and User-Defined Classes

    4.1    Cell Arrays

    4.2    Functions of Variable-Length Arguments

    4.3    Structures

    4.4    Example: Statically Determinate Trusses (Version 3.0)

    4.5    Tables

    4.6    Conversion of Cell Arrays

    4.7    Conversion of Structure Arrays

    4.8    Conversion of Tables

    4.9    User-Defined Classes

    4.10    Additional Exercise Problems


Chapter 5  Data Visualization: Plots

    5.1    Graphics Objects and Parent-Children Relationship

    5.2    Graphics Objects Properties

    5.3    Figure Objects

    5.4    Axes Objects

    5.5    Line Objects

    5.6    Text Objects

    5.7    Legend Objects

    5.8    Bar Plots

    5.9    Pie Plots

    5.10    3-D Line Plots

    5.11    Surface and Mesh Plots

    5.12    Contour Plots

    5.13    Vector Plots

    5.14    Streamline Plots

    5.15    Isosurface Plots

    5.16    Additional Exercise Problems


Chapter 6  Animations, Images, Audios, and Videos

    6.1    Animation of Line Plots: Comet

    6.2    Stream Particles Animations

    6.3    Movie: Animation of an Engine

    6.4    Indexed Images

    6.5    True Color Images

    6.6    Audios

    6.7    Videos

    6.8    Example: Statically Determinate Trusses (Version 4.0)

    6.9    Additional Exercise Problems


Chapter 7  Data Import and Export

    7.1    Screen Text I/O

    7.2    Low-Level Text File I/O

    7.3    Low-Level Binary File I/O

    7.4    MAT-Files

    7.5    ASCII-Delimited Files

    7.6    Excel Spreadsheet Files

    7.7    Additional Exercise Problems


Chapter 8  Graphical User Interfaces

    8.1    Predefined Dialog Boxes

    8.2    UI-Controls: Pushbuttons

    8.3    Example: Image Viewer

    8.4    UI-Menus: Image Viewer

    8.5    Panels, Button Groups, and More UI-Controls

    8.6    UI-Controls: Sliders

    8.7    UI-Tables: Truss Data

    8.8    Example: Statically Determinate Trusses (Version 5.0)

    8.9    GUIDE:

    8.10    App Designer

    8.11    Additional Exercise Problems


Chapter 9  Symbolic Mathematics

    9.1    Symbolic Numbers, Variables, Functions, and Expressions

    9.2    Simplification of Expressions

    9.3    Symbolic Differentiation: Curvature of a Planar Curve

    9.4    Symbolic Integration: Normal Distributions

    9.5    Limits

    9.6    Taylor Series

    9.7    Algebraic Equations

    9.8    Inverse of Matrix: Hooke's Law

    9.9    Ordinary Differential Equations (ODE)

    9.10    Additional Exercise Problems


Chapter 10  Linear Algebra, Polynomial, Curve Fitting, and Interpolation

    10.1    Products of Vectors

    10.2    Systems of Linear Equations

    10.3    Backslash Operator (\)

    10.4    Eigenvalue Problems

    10.5    Polynomials

    10.6    Polynomial Curve Fittings

    10.7    Interactive Curve-Fitting Tools

    10.8    Linear Fit Through Origin: Brake Assembly

    10.9    Interpolations

    10.10    Two-Dimensional Interpolations


Chapter 11  Differentiation, Integration, and Differential Equations

    11.1    Numerical Differentiation

    11.2    Numerical Integration: trapz

    11.3    Length of a Curve

    11.4    User-Defined Function as Input Argument: integral

    11.5    Area and Centroid

    11.6    Placing Weight on Spring Scale

    11.7    Double Integral: Volume Under Stadium Dome

    11.8    Initial Value Problems

    11.9    IVP: Placing Weight on Spring Scale

    11.10    ODE-BVP: Deflection of Beams

    11.11    IBVP: Heat Conduction in a Wall


Chapter 12  Nonlinear Equations and Optimization

    12.1    Nonlinear Equations: Intersection of  Two Curves

    12.2    Kinematics of Four-Bar Linkage

    12.3    Asymmetrical Two-Spring System

    12.4    Linear Programming: Diet Problem

    12.5    Mixed-Integer Linear Programming

    12.6    Unconstrained Single-Variable Optimization

    12.7    Unconstrained Multivariate Optimization

    12.8    Multivariate Linear Regression

    12.9    Non-Polynomial Curve Fitting

    12.10    Constrained Optimization


Chapter 13  Statistics

    13.1    Descriptive Statistics

    13.2    Normal Distribution

    13.3    Central Limit Theory

    13.4    Confidence Interval

    13.5    Chi-Square Distribution

    13.6    Student's t-Distribution

    13.7    One-Sample t-Test: Voltage of Power Supply

    13.8    Linear Combination of Random Variables

    13.9    Two-Sample t-Test: Injection Molded Plastic

    13.10    F-Distribution    513

    13.11    Two-Sample F-Test: Injection Molded Plastic

    13.12    Comparison of Means by F-Test