Fundamentals of MATLAB Programming
by Zara Noroozi
This is the textbook for ENGR 20: Introduction to MATLAB Programming at Irvine Valley College (IVC).
Description from LibreTexts.
- Publisher
- Irvine Valley College
- Subjects
- Engineering
- Licence
- CC BY-NC-SA 4.0, as LibreTexts states it. Non-commercial use only.
- Who can read
- Tweens profiles and older, judged from its title and subjects
Contents
LibreTexts writes equations in TeX, and here they show as TeX; the PDF has them typeset.
- Front Matter
- TitlePage
- InfoPage
- Table of Contents
- Licensing
- About This Book
- 1: Introduction
- 1.1: Learning Objectives
- 1.2: Why Should You Learn MATLAB?
- 1.3: What is MATLAB?
- 1.4: Getting to Know the MATLAB Environment
- 1.5: Using MATLAB Interactively
- 1.6: Variable and Assignment Statements
- 1.7: Useful Workspace Commands
- 1.8: A short Introduction to Binary Numbers and Computer Storage
- 1.9: MATLAB Data Types
- 1.9.1: Numeric Variables
- 1.9.2: Texts - Characters and Strings
- 1.9.3: Logical Variables
- 1.10: Numeric Expressions and Operations
- 1.11: Logical Operators
- 1.12: Getting Help in MATLAB
- 1.13: Common Mistakes and Best Practices
- 1.14: Chapter Exercises
- 2: Scripts and Functions
- 2.1: Learning Objectives
- 2.2: From Calculator Commands to Programs
- 2.3: MATLAB Scripts
- 2.4: Documenting Scripts with Comments
- 2.5: Getting Input from the User
- 2.6: Displaying Output - disp and fprintf
- 2.7: Scripts vs. Functions
- 2.8: Creating User-Defined Functions
- 2.9: Common MATLAB Math Fuctions
- 2.10: Common Mistakes and Best Practices
- 2.11: Chapter Exercises
- 3: One-Dimensional Arrays
- 3.1: Learning Objectives
- 3.2: Why Arrays Matter
- 3.3: Creating One-Dimensional Numeric Arrays (Vectors)
- 3.4: Common Vector Operations
- 3.5: Extending and Deleting Elements
- 3.6: Length and Size
- 3.7: Finding Minimum and Maximum Values
- 3.8: Logical Arrays and Logical Indexing
- 3.9: Scalar Arithmetic with Arrays
- 3.10: Element-by-Element Array Operations
- 3.11: Arrays as Function Arguments
- 3.12: Common Vector Operations
- 3.13: Common Mistakes and Best Practices
- 3.14: Chapter Exercises
- 4: Two-Dimensional Arrays
- 4.1: Learning Objectives
- 4.2: Why Two-Dimensional Arrays Matter
- 4.3: Creating and Indexing a 2D Array
- 4.4: Extracting Rows, Columns, and Subarrays
- 4.5: Modifying and Extending a Matrix
- 4.6: Concatinating 2D Arrays
- 4.7: Flattening and Deleting Parts of a Matrix
- 4.8: Logical Indexing with 2D Arrays
- 4.9: The end, size, length, numel, min, and max functions
- 4.10: Special 2D Arrays
- 4.11: More Matrix Functions
- 4.12: Array Operations vs. Matrix Operations
- 4.13: Sorting Arrays
- 4.14: Logical Functions for Arrays
- 4.15: Common Mistakes and Best Practices
- 4.16: Chapter Exercises
- 5: Branches
- 5.1: Learning Objectives
- 5.2: Why Programs Need Branches
- 5.3: Conditions and Decision Making
- 5.4: The if Statement
- 5.5: The if-else Statement
- 5.6: Multiple Branches with if-elseif-else
- 5.7: The Switch Statement
- 5.8: Common Mistakes and Best Practices
- 5.9: Chapter Exercises
- 6: Loops
- 6.1: Learning Objectives
- 6.2: Why Do We Need Loops?
- 6.3: while Loops
- 6.4: for Loops
- 6.5: Processing Arrays with for Loops
- 6.6: Nested Loops
- 6.7: The break Statement
- 6.8: The continue Statement
- 6.9: while Loops vs. for Loops
- 6.10: Common Mistakes and Best Practices
- 6.11: Practice Exercises
- 7: Strings and Character Arrays
- 7.1: Learning Objectives
- 7.2: Why Text Matters in MATLAB
- 7.3: Creating Strings
- 7.4: Creating Character Vector
- 7.5: Converting Between Strings and Character Vectors
- 7.6: Counting Characters- strlength vs. length
- 7.7: Comparing Text
- 7.8: Checking Text Types and Properties
- 7.9: Finding Text
- 7.10: Parsing and Editing Text
- 7.11: Converting and Formatting Text
- 7.12: Combining Text
- 7.13: Common Mistakes and Best Practices
- 7.14: Chapter Exercises
- 8: Data Structures
- 8.1: Learning Objectives
- 8.2: Introduction- When Regular Arrays are Not Enough
- 8.3: Review- Homogeneous and Heterogeneous Data
- 8.4: Cell Arrays
- 8.5: Structures
- 8.6: Arrays of Structures
- 8.7: Tables
- 8.8: Common Mistakes and Best Practices
- 8.9: Chapter Exercises
- 9: File Input - Output
- 9.1: Learning Objectives
- 9.2: Why File Input and Output Matters
- 9.3: Simple File I/O with load and save
- 9.4: Limitations of load and save
- 9.5: The Three-Step Process for Advanced File I/O
- 9.6: Reading Mixed Data with textscan
- 9.7: Reading One Line at a Time with fgetl
- 9.8: Writing Formatted Text with fprintf
- 9.9: Spreadsheet File I/O
- 9.10: Storing File Content in an M-File
- 9.11: Choosing the Right File I/O Tool
- 9.12: Common Mistakes and Best Practices
- 9.13: Chapter Exercises
- 10: Plotting
- 10.1: Learning Objectives
- 10.2: Why Data Visualization Matters
- 10.3: Creating Simple Plots
- 10.4: Creating Subplots
- 10.5: Plots with Error Bars
- 10.6: Other Common 2D Plot Types
- 10.7: Changing Graphics Properties
- 10.8: Histograms
- 10.9: Pie Charts
- 10.10: Scatter Plots
- 10.11: Three-Dimensional Plots
- 10.12: Animated Plots
- 10.13: Mesh and Surface Plots
- 10.14: Saving and Opening Figures
- 10.15: Choosing the Right Plot Type
- 10.16: Common Mistakes and Best Practices
- 10.17: Chapter Exercises
- 11: Introduction to Simulink
- 11.1: Learning Objectives
- 11.2: What is Simulink?
- 11.3: Getting Started with Simulink
- 11.4: Basic Simulink Vocabulary
- 11.5: Example- Adding Two Numbers
- 11.6: Subtracting Two Numbers
- 11.7: Using MATLAB Variables in Simulink
- 11.8: Example- Evaluating an Expression
- 11.9: Time-Varying Signals and the Scope Block
- 11.10: Modeling y = sin(x)/x
- 11.11: Exporting Simulink Output to MATLAB
- 11.12: Solving Differential Equations in Simulink
- 11.13: Example- Falling Object with Air Drag
- 11.14: Example- Falling Object Position
- 11.15: Common Mistakes and Best Practices
- 11.16: Chapter Exercises
- 12: Applied Mathematics
- 12.1: Learning Objectives
- 12.2: Why Applied Mathematics Matters in MATLAB
- 12.3: Polynomials in MATLAB
- 12.4: Interpolation
- 12.5: Curve Fitting
- 12.6: Anonymous Functions
- 12.7: Numerical Integration
- 12.8: Numerical Differentiation and Polynomial Derivatives
- 12.9: Finding Roots
- 12.10: Common Mistakes and Best Practices
- 12.11: Chapter Exercises
- 13: Linear Algebra
- 13.1: Learning Objectives
- 13.2: Why Linear Algebra Matters
- 13.3: Vectors in MATLAB
- 13.4: Vectors as Physical Quantities
- 13.5: Vector Scalar Multiplication
- 13.6: Array Operations Review
- 13.7: Dot Product of Two Vectors
- 13.8: Cross Product of Two Vectors
- 13.9: Magnitude and Unit Vectors
- 13.10: Special Matrices and Matrix Operations
- 13.11: Matrix Addition and Subtraction
- 13.12: Matrix Scalar Multiplication
- 13.13: Matrix Multiplication
- 13.14: Matrix Determinant
- 13.15: Matrix Inverse
- 13.16: Linear Algebraic Equations
- 13.17: Writing a Linear System as Ax = b
- 13.18: Solving Ax = b
- 13.19: Possible Solutions to a Linear System
- 13.20: Strategy for Setting Up Linear Systems
- 13.21: Visualizing a 2 by 2 System of Equations
- 13.22: Common Mistakes and Best Practices
- 13.23: Chapter Exercises
- 14: Symbolic Math
- 14.1: Learning Objectives
- 14.2: Introduction- Why Symbolic Math?
- 14.3: Creating and Evaluating Symbolic Variables and Expressions
- 14.4: Symbolic Differentiation
- 14.5: Symbolic Integration
- 14.6: Solving Equations Symbolically
- 14.7: Solving Systems of Equations
- 14.8: Simplifying, Expanding, and Factoring Expressions
- 14.9: Solving Differential Equations with dsolve
- 14.10: Plotting Symbolic Expressions
- 14.11: Common Mistakes and Best Practices
- 14.12: Chapter Exercises
- Back Matter
- Index
- Glossary
- Detailed Licensing
- Detailed Licensing