
External
Fundamentals of MATLAB Programming
This is the textbook for ENGR 20: Introduction to MATLAB Programming at Irvine Valley College (IVC).
- Author
- Zara Noroozi
- Publisher
- Irvine Valley College
- Source
- LibreTexts
- License
- CC BY-NC-SA
- Language
- EN
- Category
- Information Technology
Contents· 207 sections
- 01: Introduction
- 1.01: Learning Objectives
- 1.02: Why Should You Learn MATLAB
- 1.03: What is MATLAB
- 1.04: Getting to Know the MATLAB Environment
- 1.05: Using MATLAB Interactively
- 1.06: Variable and Assignment Statements
- 1.07: Useful Workspace Commands
- 1.08: A short Introduction to Binary Numbers and Computer Storage
- 1.09: MATLAB Data Types
- 1.9.01: Numeric Variables
- 1.9.02: Texts - Characters and Strings
- 1.9.03: 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
- 02: Scripts and Functions
- 2.01: Learning Objectives
- 2.02: From Calculator Commands to Programs
- 2.03: MATLAB Scripts
- 2.04: Documenting Scripts with Comments
- 2.05: Getting Input from the User
- 2.06: Displaying Output - disp and fprintf
- 2.07: Scripts vs. Functions
- 2.08: Creating User-Defined Functions
- 2.09: Common MATLAB Math Fuctions
- 2.10: Common Mistakes and Best Practices
- 2.11: Chapter Exercises
- 03: One-Dimensional Arrays
- 3.01: Learning Objectives
- 3.02: Why Arrays Matter
- 3.03: Creating One-Dimensional Numeric Arrays (Vectors)
- 3.04: Common Vector Operations
- 3.05: Extending and Deleting Elements
- 3.06: Length and Size
- 3.07: Finding Minimum and Maximum Values
- 3.08: Logical Arrays and Logical Indexing
- 3.09: 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
- 04: Two-Dimensional Arrays
- 4.01: Learning Objectives
- 4.02: Why Two-Dimensional Arrays Matter
- 4.03: Creating and Indexing a 2D Array
- 4.04: Extracting Rows Columns and Subarrays
- 4.05: Modifying and Extending a Matrix
- 4.06: Concatinating 2D Arrays
- 4.07: Flattening and Deleting Parts of a Matrix
- 4.08: Logical Indexing with 2D Arrays
- 4.09: 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
- 05: Branches
- 5.01: Learning Objectives
- 5.02: Why Programs Need Branches
- 5.03: Conditions and Decision Making
- 5.04: The if Statement
- 5.05: The if-else Statement
- 5.06: Multiple Branches with if-elseif-else
- 5.07: The Switch Statement
- 5.08: Common Mistakes and Best Practices
- 5.09: Chapter Exercises
- 06: Loops
- 6.01: Learning Objectives
- 6.02: Why Do We Need Loops
- 6.03: while Loops
- 6.04: for Loops
- 6.05: Processing Arrays with for Loops
- 6.06: Nested Loops
- 6.07: The break Statement
- 6.08: The continue Statement
- 6.09: while Loops vs. for Loops
- 6.10: Common Mistakes and Best Practices
- 6.11: Practice Exercises
- 07: Strings and Character Arrays
- 7.01: Learning Objectives
- 7.02: Why Text Matters in MATLAB
- 7.03: Creating Strings
- 7.04: Creating Character Vector
- 7.05: Converting Between Strings and Character Vectors
- 7.06: Counting Characters- strlength vs. length
- 7.07: Comparing Text
- 7.08: Checking Text Types and Properties
- 7.09: 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
- 08: Data Structures
- 8.01: Learning Objectives
- 8.02: Introduction- When Regular Arrays are Not Enough
- 8.03: Review- Homogeneous and Heterogeneous Data
- 8.04: Cell Arrays
- 8.05: Structures
- 8.06: Arrays of Structures
- 8.07: Tables
- 8.08: Common Mistakes and Best Practices
- 8.09: Chapter Exercises
- 09: File Input - Output
- 9.01: Learning Objectives
- 9.02: Why File Input and Output Matters
- 9.03: Simple File I O with load and save
- 9.04: Limitations of load and save
- 9.05: The Three-Step Process for Advanced File I O
- 9.06: Reading Mixed Data with textscan
- 9.07: Reading One Line at a Time with fgetl
- 9.08: Writing Formatted Text with fprintf
- 9.09: 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.01: Learning Objectives
- 10.02: Why Data Visualization Matters
- 10.03: Creating Simple Plots
- 10.04: Creating Subplots
- 10.05: Plots with Error Bars
- 10.06: Other Common 2D Plot Types
- 10.07: Changing Graphics Properties
- 10.08: Histograms
- 10.09: 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.01: Learning Objectives
- 11.02: What is Simulink
- 11.03: Getting Started with Simulink
- 11.04: Basic Simulink Vocabulary
- 11.05: Example- Adding Two Numbers
- 11.06: Subtracting Two Numbers
- 11.07: Using MATLAB Variables in Simulink
- 11.08: Example- Evaluating an Expression
- 11.09: 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.01: Learning Objectives
- 12.02: Why Applied Mathematics Matters in MATLAB
- 12.03: Polynomials in MATLAB
- 12.04: Interpolation
- 12.05: Curve Fitting
- 12.06: Anonymous Functions
- 12.07: Numerical Integration
- 12.08: Numerical Differentiation and Polynomial Derivatives
- 12.09: Finding Roots
- 12.10: Common Mistakes and Best Practices
- 12.11: Chapter Exercises
- 13: Linear Algebra
- 13.01: Learning Objectives
- 13.02: Why Linear Algebra Matters
- 13.03: Vectors in MATLAB
- 13.04: Vectors as Physical Quantities
- 13.05: Vector Scalar Multiplication
- 13.06: Array Operations Review
- 13.07: Dot Product of Two Vectors
- 13.08: Cross Product of Two Vectors
- 13.09: 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.01: Learning Objectives
- 14.02: Introduction- Why Symbolic Math
- 14.03: Creating and Evaluating Symbolic Variables and Expressions
- 14.04: Symbolic Differentiation
- 14.05: Symbolic Integration
- 14.06: Solving Equations Symbolically
- 14.07: Solving Systems of Equations
- 14.08: Simplifying Expanding and Factoring Expressions
- 14.09: Solving Differential Equations with dsolve
- 14.10: Plotting Symbolic Expressions
- 14.11: Common Mistakes and Best Practices
- 14.12: Chapter Exercises