Programs MatLab

Matlab programs

    Roots of nonlinear equations
    • Five methods for finding roots Root5.m (bisectional, false position, secant, brute force and using matlab)
    Integration
    • Automatic adaptive integration - Newton-Cotes quadrature Quanc8.m
    • Trapezoid, Simpson and Gauss quadrature - effect of number of intervals IntegralN.m
    Ordinary Differential Equations (Initial Value Problem)
    • First-order ODE (choose a method) ODE1.m
    • First-order ODE (three methods) ODE1_3.m
    • First-order ODE (RKF45 method) Ode1Rkf45.m
    • Second-order ODE (RKF45 method) Ode2Rkf45.m
    • Pendulum d2x/dt2 = (-1.0*omega0^2)*sin(x) - alpha*(dx/dt) + force*cos(omega*t) Pendulum2022.m
    • System of n first-order ODE equations ODEn.m
    Ordinary Differential Equations (Boundary Value Problem)
    • Method: equilibrium with Dirichlet boundary conditions ODE_FDM1.m
    • Method: equilibrium with various boundary conditions ODE_FDM3.m
    • Method: Shooting with Dirichlet boundary conditions ODE_Shoot1.m
    • Solving Schrodinger equation using the shooting method SchrodingerSM.m
    • Solving Schrodinger equation using the equilibrium (FDM) method SchrodingerFDM3.m
    Partial Differential Equations
    • Poisson equation with Dirichlet boudary conditions PDE_EPoisson.m
    • Heat equation with Dirichlet boudary conditions (2 methods: FTCS and BTCS) PDE_PHeat.m
    Monte-Carlo Method
    • Uniform random number generator (testimg) Rng1Uniform.m
    • Non-uniform RNG (the rejection method) Rng2Reject.m
    • Non-uniform RNG (three method: rejection, transform, Metropolis) Rng3Methods.m
    • Monte-Carlo integration by mean value: IntegralMC1.m
    • Monte-Carlo integration without and with sampling: IntegralMC3.m
    • Random walk: simple 2D random walk: rwalk01.m
    • Random walk: 2D random walk in a city: rwalk02.m
    • Random walk: 2D random walk in a city: rwalk02.m
    • Random walk: 2D random walk in a city with a trap: rwalk03.m
    • Random walk: 2D sefl-avoiding random walk (polymer growing): Rwalk2.m