Skip to content

Zettergren-Courses/EP501_python

Repository files navigation

EP501_python

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.

Codes updated for FA2020 semester

Basic python functionality

  1. Located in ./python_basics
  2. Contains scripts showing how to execute basic calculations and plotting in Python (basic_python.py).
  3. Contains a script showing how to use python to load data from MATLAB .mat files (load_matlab_file.py).

Numerical linear algebra

  1. Located in ./linear_algebra/
  2. Illustrates and checks various methods for solving matrix problems
  3. Contains python modules for elimination (elimtools.py) and iterative solutions (ittools.py) to linear systems of equations.
  4. Contains example scripts showing use of simple elimination (simple_elim_example.py) and Gaussian elimination (Gauss_elim_example.py).
  5. Contains examples of using iterative solutions based on Jacobi iteration (Jacobi_example.py).

Nonlinear equations

  1. Located in ./nonlinear_eqns
  2. Illustrates solutions to various nonlinear equations and systems
  3. 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)
  4. Contains various functions for exact Newton's method in 1D and 2D in the module (newton_methods.py)
  5. Contains a module with objective functions that can be used as examples to demonstrate root finding algorithms (nonlinear_fns.py).

Polynomials and data fitting

  1. Located in ./polynomials
  2. Illustrates how to fit various types of polynomials to data
  3. Contains examples of direct polynomial fitting (direc_fit.py), linear least squares fitting (least_squares.py), and bilinear/spline interpolation (interpolation_examples.py)

Numerical differentiation and integration

  1. located in ./differentiation
  2. examples of finite difference formulas and applications
  3. one-dimensional (derivative_examples.py) and multi-dimensional scripts (e.g. gradient operator, partial_derivative_examples.py)

Ordinary differential equations (ODEs)

  1. located in ./ODEs
  2. examples of Methods for solving ordinary differential equations
  3. 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).

Releases

No releases published

Packages

No packages published

Languages