Example code and simulated data for a mathematical modeling class.
Includes topics:
- Curve Fitting (plotting, polyfit, transformed least squares, lsqcurvefit/curve_fit)
- Gradient Ascent/Descent Optimization in 1D & 2D
- Simulating Randomness: a fair or unfair coin/die, normal and exponential distributions
- Monte Carlo Simulations (several)
- Markov Chains
- Iterating a Difference Equation
- Euler's Method and ode45/solve_ivp: implementation, direct comparison
Code Formats:
- Matlab (.m files)
- Python / Jupyter Notebook (.ipynb files)
- Python (.py files)
These sets are not 100% complete but the .m and .ipynb formats each cover most of the topic list above.
Synthetic example datasets are given in .mat or .csv file format.