This tutorial gives step-by-step instructions on how to simulate dynamic systems. Dynamic systems may have differential and algebraic equations (DAEs) or just differential equations (ODEs) that cause a time evolution of the response. The tutorial covers the same problem in both MATLAB and Python.

MATLAB offers several solvers to numerically simulate the solution of sets of differential equations. Below are two examples of solving a first-order decay with different solvers in MATLAB. The objective is to fit the differential equation solution to data by adjusting unknown parameters until the model and measured values match.

The second example demonstrates how this same problem is solved with APM MATLAB.

This same example problem is also demonstrated with Spreadsheet Programming and in the Python programming language. Another example problem demonstrates how to calculate the concentration of CO gas buildup in a room.

comments powered by Disqus

Retrieved from http://apmonitor.com/che263/index.php/Main/MatlabDynamicSim

Page last modified on February 10, 2017, at 03:30 PM