Physical Modeling with MATLAB  cover

Physical Modeling with MATLAB

A Hands-on Guide to Computation and Simulation
by Allen Downey
February 2021, 180 pp.
This book is currently out of stock

Download Chapter 2: SCRIPTS

MATLAB, a matrix-based language that’s popular with scientists and engineers, is surprisingly easy to learn and offers the perfect programming environment for modeling and simulating physical systems. This book is for those who are interested in these processes but have no programming experience. You’ll build up basic coding skills – useful in any high-level language – as you model systems like world population growth, infectious disease, bungee jumping, baseball trajectories, celestial mechanics, and more.

Curating the most useful and powerful subset of MATLAB, with the least amount of math, bestselling author Allen Downey cuts through the complexities and gets right to the good stuff. Once you master loops, vectors and functions, you’ll use differential equations to simulate the interactions of predator and prey species, then plot the results. As you progress, you’ll create multidimensional arrays to simulate projectiles, add new forces to your growing toolkit, and explore ways to visualize results.

Along the way, you’ll learn:

  • The modeling process and framework, including selection, analysis, and validation
  • How to use MATLAB scripts (program files), variables, values, and assignment statements
  • Program development processes like incremental development, encapsulation and generalization
  • How to use differential equations to describe Newtonian motion, simulate falling objects, and solve the “Penny Drop Myth”
  • Spatial vectors for representing multidimensional quantities that simulate projectiles, such as human cannonballs
  • How to model spring forces and gravitation, and simulate bungee cords and the orbit of the Earth around the Sun

Physical Modeling with MATLAB gives you programming skills for experimenting with fascinating problems, and empowers you to create solution models for a wide range of physical systems.

Author Bio 

Bestselling author Allen Downey is a professor with over 20 years of experience, as well as a PhD in computer science from the University of California-Berkeley. He helped start Olin College, an innovative school on a mission to transform engineering education. Downey has written numerous books, including Think Python, and other titles that use computation to explain topics in math, science, and engineering.

Table of contents 

Chapter 1: Modeling and Simulation
Chapter 2: Scripts
Chapter 3: Loops
Chapter 4: Vectors
Chapter 5: Functions
Chapter 6: Conditionals
Chapter 7: Zero-finding
Chapter 8: Functions of Vectors
Chapter 9: Ordinary Differential Equations
Chapter 10: Systems of ODEs
Chapter 11: Second-Order Systems
Chapter 12: Two Dimensions
Chapter 13: Optimization
Chapter 14: Springs and Things
Chapter 15: Under the Hood

All chapters are included in this Early Access PDF.
View the detailed Table of Contents