## Solve Differential Equations in MATLAB

## Main.MatlabDynamicSim History

Hide minor edits - Show changes to markup

(:html:)

<div id="disqus_thread"></div> <script type="text/javascript"> /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

(:htmlend:)

(:htmlend:)

#### Large-scale Dynamic Simulation

(:html:) <iframe width="560" height="315" src="https://www.youtube.com/embed/kthDuF_Wnp4" frameborder="0" allowfullscreen></iframe>

This 5 minute 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.

(:html:) <iframe width="560" height="315" src="https://www.youtube.com/embed/QKhy1JsdiUo" frameborder="0" allowfullscreen></iframe> (:htmlend:)

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.

This same example problem is also demonstrated with Spreadsheet Programming and in the Python programming language.

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.

#### Additional Material

- Case Study on CO Buildup in a Room

(:title Solve Differential Equations in MATLAB:) (:keywords introduction, MATLAB, differential equations, spreadsheet, nonlinear, university course:) (:description Solve Differential Equations in MATLAB - Problem-Solving Techniques for Chemical Engineers at Brigham Young University:)

This 5 minute 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.

(:html:) <iframe width="560" height="315" src="//www.youtube.com/embed/-IDTagajoyA?rel=0" frameborder="0" allowfullscreen></iframe> (:htmlend:)

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.

(:html:) <iframe width="560" height="315" src="//www.youtube.com/embed/ynm7B0N0_Yw" frameborder="0" allowfullscreen></iframe> (:htmlend:)

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

(:html:) <iframe width="560" height="315" src="//www.youtube.com/embed/pOXcOWMo5Hs" frameborder="0" allowfullscreen></iframe> (:htmlend:)

This same example problem is also demonstrated with Spreadsheet Programming and in the Python programming language.

(:html:)

<div id="disqus_thread"></div> <script type="text/javascript"> /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

(:htmlend:)