Math 4480/5480 - Mathematical Modeling - Spring 2012
Dr. Radu C. Cascaval

 

Home

Syllabus

Homework

Exams

Lectures

Resources

MATLAB codes (to accompany the Examples in the textbook)

  • Ex. Markov Chain Example

      Google's PageRank (pages 23-31) part of Cleve Moler's "Numerical Computing with MATLAB" book
      The m-files needed for PageRank example can be downloaded here.

  • Ex 6.4 (Logistic Map - Chaotic behavior) contains the plot of the bifurcation diagram for the limit set of the logistic map f(x)=ax(1-x)
  • HTML version perioddoubling.html
    Matlab code perioddoubling.m
    Interactive Java web applet - Period Doubling Map

  • Harvest for Profit problem (See PMP handout) contains the code for solving a system of ODEs using events in Matlab as well as the 'shooting method'
          • Matlab code harvest.m

          Control Theory Problems

          Summary of the Pontryagin Maximum Principle (PMP) and Applications: PDF Handout
          100+ more examples: PROPT Guide (more info on PROPT - Optimal Control Software - as part of TOMLAB
          CombinedPhase

      • Ex 6.3 (Euler Method for RLC circuit problem) contains Euler Method applied to the 2x2 system given by the RLC circuit Problem

        HTML version RLCeuler.html
        Matlab code RLCeuler.m

        4th order Runge-Kutta implementation for the RLC circuit RKAutonomous.m

      • Ex 6.2 (Euler Method for Whale problem) contains Euler Method applied to the 2x2 system given by the Whale Problem

        HTML version whaleseuler.html
        Matlab code whaleseuler.m

      • Ex 6.1 (War Problem) contains stability analysis for discrete dynamical systems performed via repeated simulations

        HTML version war.html
        Matlab code war.m

      • Ex 5.1 (Tree Problem) contains the code for the Eigenvalue Method for Continuous-Time Dynamical Systems

        HTML version TreeEigenvalue.html
        Matlab code TreeEigenvalue.m

      • Ex 4.3 (Docking Problem) Requires a separate file dockfun.m (see the note in the code)

        HTML version Docking.html
        Matlab code Docking.m

      • Ex 4.2 (Whales Problem) contains the code for plotting direction fields in Matlab

        HTML version Whales.html
        Matlab code Whales.m
        [For direction fields and phase portraits, see the interactive codes dfield8.m and pplane8.m - courtesy of John Polking, Rice University] Other ODE software in MATLAB.

Ex 3.5 (Dirt Problem) contains Linear Programming

    HTML version Dirt.html
    Matlab code Dirt.m

    • Ex 3.4 (Farm Problem) contains Linear Programming (Large Scale Method and SIMPLEX method)

      HTML version Farm1.html
      Matlab code Farm1.m

    • Ex 3.3 (Lawn Chair Problem) contains Newton's Method for solving systems F(x1,x2)=0, G(x1,x2)=0

      HTML version LawnChair.html
      Matlab code LawnChair.m

    • Ex 3.2 (Facility Location Problem) contains Random Search Method to solve systems F(x1,x2)=0, G(x1,x2)=0

      HTML version Facility.html
      Matlab code Facility.m (movie)

Ex 3.1 (Pig Problem with nonlinear growth assumption) contains Newton's Method for solving equations F(x)=0

HTML version NonlinearPig.html
Matlab code NonlinearPig.m

More on Zeros and Roots (from Moler's Numerical Computing book)

Ex 2.2 (Color TV Problem with constraints) contains sensitivity to both parameter a and constraint value c

HTML version lagrange.html
Matlab code lagrange.m

Lagrange Multiplier Handout (PDF)
Shadow Price = Lagrange Multiplier (PDF)

Ex 2.1 (Color TV Problem)

HTML version colorTV1.html
Matlab code colorTV1.m

Ex 1.1 (Pig Problem) contains sensitivity to both r and g

HTML version pig1.html
Matlab code pig1.m

Example of Sensitivity Analysis and Parameter Identification http://www.springerlink.com/content/y80134444q522476/

MATLAB Resources

General Resource Page: http://www.uccs.edu/~rcascava/Matlab

Handout 1: Introduction to MATLAB
Handout 2: Intro to Symbolic Math

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 
 

dd