Matlab and Octave Programming for STEM Applications
by Cary Smith
Textbook Matlab/Octave Programming for STEM Applications. This text emphasizes practical applications of MATLAB in engineering, physics, mathematics and biology. Intended for California ENGR C-ID 220
Description from LibreTexts.
- Publisher
- Oxnard 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
- Front Matter
- TitlePage
- InfoPage
- Table of Contents
- Licensing
- TitlePage
- InfoPage
- Table of Contents
- Licensing
- Preface
- 1.1: Notes to the Instructor
- Authors and Sources
- Purpose of This Book
- How this Book Was Assembled
- Back Matter
- Index
- Glossary
- Detailed Licensing
- 1: Modeling, Simulation, and MATLAB’s Interpreter
- 1.1: Obtaining MATLAB and Octave
- 1.2: Modeling
- 1.3: A Glorified Calculator
- 1.3.1: log(), round(), floor(), and ceil() functions
- 1.3.2: Trigonometry Functions
- 1.4: MATLAB User Interface
- 1.5: Octave User Interface
- 1.6: Variables and Assignment Statements
- 1.6.1: More About Valid Variable Names
- 1.7: Clearing the Workspace, Readability Tips
- 1.8: Errors
- 1.9: Built-in Function Documentation
- 1.10: Chapter Review
- 1.11: Chapter 1 videos English and Espanol
- 1.12: Exercises
- 2: MATLAB/Octave Scripts
- 2.1: How to Create a Script File and Valid File Names
- 2.2: Your First Script
- 2.2.1: .mlx Live Editor Files
- 2.3: Examples of assignment scripts
- 2.4: Why Scripts?
- 2.5: The Fibonacci Sequence
- 2.6: Floating-Point Numbers
- 2.7: Scientific Notation for Large and Small Numbers
- 2.8: Number formats
- 2.9: Complex Numbers
- 2.10: Script Comments
- 2.11: Script Documentation
- 2.12: Assignment and Equality
- 2.13: Understanding Editor Warning and Error messages
- 2.14: Debugging Directory Errors
- 2.15: Chapter Review
- 2.16: Chapter 2 Scripts videos English and Espanol
- 2.17: Exercises
- 2.17.1: More Exercises
- 3: for Loops, Ploting Points, Sequences, and Series
- 3.1: Updating Variables
- 3.2: Bug Taxonomy
- 3.3: Absolute and Relative Error
- 3.4: for Loops
- 3.4.1: for Loop Supplemental Material
- 3.5: Plotting Points
- 3.5.1: Create a 2D x-y Sine-Wave Plot with a for Loop
- 3.6: Sequences
- 3.6.1: Sequences Additional Material
- 3.7: Series
- 3.7.1: Series Additional Material
- 3.8: Generalization
- 3.9: Incremental Development
- 3.10: for Loop Incremental Development Exercise
- 3.11: Chapter Review
- 3.12: Chapter 3 for loop Videos in English and Espanol
- 3.13: Exercises
- 4: Vectors
- 4.1: Creating Vectors
- 4.2: Methods to Create Vectors in MATLAB
- 4.3: Vector Arithmetic
- 4.4: Selecting Elements
- 4.5: Indexing Errors
- 4.6: Vectors and Sequences
- 4.7: disp() and num2str() Functions and Concatenation
- 4.8: Plotting Vectors
- 4.8.1: Plotting Vectors Additional Material
- 4.9: Recursive for Loops
- 4.10: Common Vector Operations
- 4.11: Common Vector Functions
- 4.12: Chapter Review
- 4.13: Chapter 4 Vector Videos In English and Espanol
- 4.14: Exercises
- 5: User-Defined Functions
- 5.1: Name Collisions
- 5.2: Defining Functions
- 5.2.1: Function Case Study (Lambert)
- 5.3: Function Documentation
- 5.4: Naming Functions
- 5.4.1: Function Names and MATLAB Keywords
- 5.5: Functions With Multiple Input Variables
- 5.5.1: Multiple Inputs Examples and Exercises
- 5.5.2: Mutiple Inputs Example- Ideal Gas law (Lambert)
- 5.6: Functions with Multiple Outputs
- 5.7: Matlab Functions with No Inputs
- 5.8: Matlab Functions with No Outputs
- 5.9: Matlab Functions with No Inputs and No Outputs
- 5.10: Functions with variable numbers of inputs or outputs
- 5.11: How Functions Work
- 5.12: Chapter Review
- 5.13: Chapter 5 Function videos English and Espanol
- 5.14: Exercise
- 6: Conditionals Part 1
- 6.1: Relational Operators
- 6.1.1: Relational Operators List
- 6.1.2: Octave vs. MATLAB--not equal, end, endif, endfunction
- 6.2: if Statement
- 6.3: if, else, elseif
- 6.4: Incremental Development
- 6.5: Logical Functions
- 6.6: Nested for Loops
- 6.7: Putting It Together
- 6.8: Encapsulation and Generalization
- 6.9: Adding a continue Statement
- 6.10: Chapter Review
- 6.11: Chapter 6 if-logic videos English and Espanol
- 6.12: Exercise
- 7: Conditionals Part 2- Series, Switch Logic, Error Checking, and While Loops
- 7.1: if, elseif, else with Error Checking
- 7.2: Flowcharts
- 7.3: The input() Function
- 7.4: Compound Logical Operators
- 7.4.1: Compound if, elseif Logic Examples
- 7.5: Working with Conditions
- 7.6: Shortcut and, or, Logical Operations
- 7.7: for loops with break Logic
- 7.8: 'while' Loops
- 7.9: 'switch' Logic
- 7.10: The find() function
- 7.11: Chapter 7 Conditionals, Part 2, Videos English and Espanol
- 8: User-defined Functions of Vectors
- 8.1: Functions and Vectors
- 8.1.1: Built-in MATLAB Functions of Vectors
- 8.1.2: User-Defined Functions of Vectors Examples and Exercises
- 8.2: Computing with Vectors
- 8.3: Debugging in Four Acts
- 8.3.1: Debugging Theorems all in 1 Place
- 8.4: Chapter Review
- 8.5: Chapter 8 Function Videos English and Espanol
- 9: MATLAB Random Number and Statistics Functions
- 9.1: MATLAB Random Number Functions
- 9.2: MATLAB Statistics Functions
- 9.3: Statistical Plots
- 9.4: Random Number Applications
- 9.5: Chapter 9 Random Number Videos English and Espanol
- 10: Interpolation and Curve Fitting
- 10.1: Linear Interpolation
- 10.1.1: Linear Interpolation Problem Set
- 10.2: Nonlinear Interpolation
- 10.3: Linear and Polynomial Curve Data Fitting
- 10.4: Polynomial Fitting Problem Set
- 10.5: Interactive Fitting Tools
- 10.6: Chapter 10 Curve Fitting Videos in English and Espanol
- 11: Zero Finding and Fourier Transforms
- 11.1: Solving Nonlinear Equations with fzero()
- 11.2: fzero() Examples and Exercises
- 11.3: Using fzero() to find the intersection of 2 functions
- 11.4: Subfunctions
- 11.5: Anonymous (or In-Line) Functions
- 11.6: Debugging- More Name Collisions
- 11.7: Fourier Transforms
- 11.8: Chapter Review
- 11.9: Chapter 11 Zero finding Videos English and Espanol
- 11.10: Exercises
- 12: MATLAB Matrices (Arrays)
- 12.1: Creating Matrices and Arrays
- 12.3: Common Matrix Functions
- 12.4: Matrix Indexing
- 12.5: Matrix Operations, Introduction
- 12.6: Matrix Tables and Nested Loops
- 12.7: Dot Product
- 12.8: Cross Product and Torque
- 12.9: Chapter 12 Matrix Videos English and Espanol
- 13: Linear Algebra
- 13.1: Basic Matrix Multiplication
- 13.2: Matrix Multiplication Applications
- 13.3: Matrix Inverse, Rank and Determinant
- 13.4: Solving Systems of Equations
- 13.5: Systems of Equations Examples and Exercises
- 13.6: Over-Determined Systems of Equations
- 13.7: Chapter 13 Linear Algebra Videos in English and Espanol
- 14: Advanced Plotting
- 14.1: scatter, scatter3
- 14.2: Plot 3D Surface and Contour Plots
- 14.3: Advanced Plot Formatting
- 14.4: Log plots
- 14.5: Subplots
- 14.6: Chapter 14 Advanced Plotting Videos in English and Espanol
- 15: Formatted Input and Output
- 15.1: sprintf() and fprintf(), Introduction
- 15.2: fprintf() to a file
- 15.3: Reading from an Excel file in MATLAB and Octave
- 15.4: Chapter 15 Videos English and Espanol
- 16: MATLAB Structures and Data Types
- 16.1: Numeric data types
- 16.2: Comparing Character Strings
- 16.3: table Data Type
- 16.4: struct Data Type
- 16.4.1: struct Examples and Exercises
- 16.5: cell array
- 16.6: Chapter 16 Data Types Videos in English and Espanol
- 17: Top-Down Design, Agile Software Development, and Object-Oriented Programming in MATLAB
- 17.1: Top-Down Design
- 17.2: Agile Software Development
- 17.3: Object-Oriented Programming, Part 1
- 17.4: Object-Oriented Programming, Part 2
- 17.5: Chapter 17 Videos in English and Espanol
- 18: Integration and Differentiation
- 18.1: Integration- Computing the Area Under a Curve
- 18.1.1: Problem Set
- 18.1.2: The integral() function
- 18.2: Numerical Differentiation
- 18.3: Chapter 18 Differentiation and Integration Videos in English and Espanol
- 19: Ordinary Differential Equations
- 19.1: Functions and Files
- 19.2: Differential Equations
- 19.3: Euler’s Method
- 19.4: Implementing Euler’s Method
- 19.5: Solving ODEs with ode45
- 19.5.1: ODE45 Examples and Exercises
- 19.6: Time Dependence
- 19.7: What Could Go Wrong?
- 19.8: Labeling Axes
- 19.9: Chapter Review
- 19.10: Chapter 19 ODE Videos in English and Espanol
- 19.11: Exercise
- 20: Symbolic Processing
- Back Matter
- Detailed Licensing
- MATLAB Functions, Commands and Special Characters
- Index
- Glossary
- Detailed Licensing