Python scripts for EP501. This repository is very much a work-in-progress. I will be updating it throughout the semester as I port more of my codes from the MATLAB repository for EP501 over to python. Many of the MATLAB codes will eventually be ported, but I can't gaurantee that they all will by the end of the semester. Either way you are free to use python to complete your assignments.
- Located in ./python_basics
- Contains scripts showing how to execute basic calculations and plotting in Python (basic_python.py).
- Contains a script showing how to use python to load data from MATLAB .mat files (load_matlab_file.py).
- Located in ./linear_algebra/
- Illustrates and checks various methods for solving matrix problems
- Contains python modules for elimination (elimtools.py) and iterative solutions (ittools.py) to linear systems of equations.
- Contains example scripts showing use of simple elimination (simple_elim_example.py) and Gaussian elimination (Gauss_elim_example.py).
- Contains examples of using iterative solutions based on Jacobi iteration (Jacobi_example.py).
- Located in ./nonlinear_eqns
- Illustrates solutions to various nonlinear equations and systems
- Contains examples of interval halving (interval_halving.py), false position (false_position.py), Newton's method in 1D (Newton_Rhapson.py), and Newton's method in 2D (Newton_Rhapson2D.py)
- Contains various functions for exact Newton's method in 1D and 2D in the module (newton_methods.py)
- Contains a module with objective functions that can be used as examples to demonstrate root finding algorithms (nonlinear_fns.py).
- Located in ./polynomials
- Illustrates how to fit various types of polynomials to data
- Contains examples of direct polynomial fitting (direc_fit.py), linear least squares fitting (least_squares.py), and bilinear/spline interpolation (interpolation_examples.py)
- located in ./differentiation
- examples of finite difference formulas and applications
- one-dimensional (derivative_examples.py) and multi-dimensional scripts (e.g. gradient operator, partial_derivative_examples.py)
- located in ./ODEs
- examples of Methods for solving ordinary differential equations
- Euler methods (Euler_methods.py), Runge-Kutta solutions (RK_methods.py), examples of resolving systems of ODEs (RK_systems.py), and backward difference formula comparisons (BDF_examples.py).