Physical Modeling in MATLAB

by Allen B. Downey

Modeling and simulation are powerful tools for explaining the world, making predictions, designing things that work, and making them work better. Learning to use these tools can be difficult; this book is my attempt to make the experience as enjoyable and productive as possible. By reading this book—and working on the exercises—you will learn some programming, some modeling, and some simulation. With basic programming skills, you can create models for a wide range of physical systems.

Description from LibreTexts.

Publisher
Olin College
Subjects
Mathematics, Scientific Computing Simulations and Modeling
Licence
CC BY-NC 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.

  1. Front Matter
  2. TitlePage
  3. InfoPage
  4. Table of Contents
  5. Licensing
  6. 1: Modeling and Simulation
  7. 1.1: Modeling
  8. 1.2: A Glorified Calculator
  9. 1.3: Variables
  10. 1.4: Errors
  11. 1.5: Documentation
  12. 1.6: Chapter Review
  13. 1.7: Exercises
  14. 2: Scripts
  15. 2.1: Your First Script
  16. 2.2: Why Scripts?
  17. 2.3: The Fibonacci Sequence
  18. 2.4: Floating-Point Numbers
  19. 2.5: Comments
  20. 2.6: Documentation
  21. 2.7: Assignment and Equality
  22. 2.8: Chapter Review
  23. 2.9: Exercises
  24. 3: Loops
  25. 3.1: Updating Variables
  26. 3.2: Bug Taxonomy
  27. 3.3: Absolute and Relative Error
  28. 3.4: for Loops
  29. 3.5: Plotting
  30. 3.6: Sequences
  31. 3.7: Series
  32. 3.8: Generalization
  33. 3.9: Incremental Development
  34. 3.10: Chapter Review
  35. 3.11: Exercises
  36. 4: Vectors
  37. 4.1: Creating Vectors
  38. 4.2: Vector Arithmetic
  39. 4.3: Selecting Elements
  40. 4.4: Indexing Errors
  41. 4.5: Vectors and Sequences
  42. 4.6: Plotting Vectors
  43. 4.7: Common Vector Operations
  44. 4.8: Chapter Review
  45. 4.9: Exercises
  46. 4.10: Working with Conditions
  47. 5: Functions
  48. 5.1: Name Collisions
  49. 5.2: Defining Functions
  50. 5.3: Function Documentation
  51. 5.4: Naming Functions
  52. 5.5: Multiple Input Variables
  53. 5.6: Chapter Review
  54. 5.7: Exercise
  55. 6: Conditionals
  56. 6.1: Relational Operators
  57. 6.2: if Statement
  58. 6.3: Incremental Development
  59. 6.4: Logical Functions
  60. 6.5: Nested Loops
  61. 6.6: Putting It Together
  62. 6.7: Encapsulation and Generalization
  63. 6.8: Adding a continue Statement
  64. 6.9: How Functions Work
  65. 6.10: Chapter Review
  66. 6.11: Exercise
  67. 7: Zero-finding
  68. 7.1: Solving Nonlinear Equations
  69. 7.2: Debugging
  70. 7.3: Chapter Review
  71. 7.4: Exercises
  72. 8: Functions of vectors
  73. 8.1: Functions and Vectors
  74. 8.2: Computing with Vectors
  75. 8.3: Debugging in Four Acts
  76. 8.4: Chapter Review
  77. 9: Ordinary Differential Equations
  78. 9.1: Functions and Files
  79. 9.2: Differential Equations
  80. 9.3: Euler’s Method
  81. 9.4: Implementing Euler’s Method
  82. 9.5: Solving ODEs with ode45
  83. 9.6: Time Dependence
  84. 9.7: What Could Go Wrong?
  85. 9.8: Labeling Axes
  86. 9.9: Chapter Review
  87. 9.10: Exercise
  88. 10: Systems of ODEs
  89. 10.1: Matrices
  90. 10.2: Solving Systems of ODEs
  91. 10.3: Chapter Review
  92. 10.4: Exercises
  93. 11: Second-order systems
  94. 11.1: Newtonian Motion
  95. 11.2: Free Fall
  96. 11.3: ODE Events
  97. 11.4: Air Resistance
  98. 11.5: Chapter Review
  99. 11.6: Exercises
  100. 12: Two Dimensions
  101. 12.1: Spatial Vectors
  102. 12.2: Adding Vectors
  103. 12.3: ODEs in Two Dimensions
  104. 12.4: Drag Force
  105. 12.5: What Could Go Wrong?
  106. 12.6: Chapter Review
  107. 12.7: Exercises
  108. 13: Optimization
  109. 13.1: Optimal Baseball
  110. 13.2: Trajectory
  111. 13.3: Range Versus Angle
  112. 13.4: fminsearch
  113. 13.5: Animation
  114. 13.6: Chapter Review
  115. 13.7: Exercises
  116. 14: Springs and Things
  117. 14.1: Bungee Jumping
  118. 14.2: Bungee Revisited
  119. 14.3: Spider-Man
  120. 14.4: Celestial Mechanics
  121. 14.5: Conservation of Energy
  122. 14.6: Chapter Review
  123. 15: Under the Hood
  124. 15.1: How ode45 Works
  125. 15.2: How fzero Works
  126. 15.3: How fminsearch Works
  127. 15.4: Chapter Review
  128. Back Matter
  129. Index
  130. Glossary
  131. Detailed Licensing