Last | Top | Next

Applied Problem Solving with Matlab
List of Matlab Demos

This page contains a summary list of the Matlab demos that were used within this course. The list is organized by lesson number and by the order that the files were discussed in class. Many of these files were discussed in some detail in class, as they served as a guide for the Matlab assignments that were given throughout the semester. Careful study of these sample files can introduce you to a variety of Matlab programming features and also give you a solid understanding for many of the problem-solving strategies and techniques that were discussed in this course.

Matlab Fundamentals
Evaluates and plots the dynamics of the simple linear pendulum discussed in Lesson 1.
Linear algebra manipulations within Matlab to compare with the hand calculations done in Lesson 2.
Demonstrates the use of Matlab functions as discussed in Lesson 3.
Another demonstration of Matlab functions as discussed in the Lesson 3 lectures.
Emphasizes one important aspect of conditional statements in Matlab as discussed in the Lesson 3 lectures.
Demonstrates the use of for ... end and while ... end loops in Matlab as discussed in the Lesson 3 lectures.
Illustrates various Matlab programming features discussed in Lesson 3. This example processes summary data concerning the amount of rainfall in Corvallis, Oregon for over a hundred years.

Introduction to Numerical Error and Related Topics
Estimates machine epsilon as discussed in Lesson 4.
Approximates the derivatives of exp(x) at x = 0 for different step sizes as discussed in Lesson 4.
Shows trade-off in truncation and round off error when solving a simple IVP. This file illustrates some key concepts from Lesson 4.

Root Finding and Polynomial Manipulations
Matlab function files to implement the Bisection and Secant methods for finding the real roots of a nonlinear equation. These files illustrate the basic algorithms for the Bracketing and Open Methods discussed in Lesson 5.
Simple root finding example for Lesson 5 (uses bisection.m, secant.m, and Matlab's built-in fzero routine).
Demo for working with polynomials and roots of polynomials within Matlab.
Solution to Problem 1 in Lesson 5: Finds the volume and height of fluid in a horizontal cylindrical tank.
Solution to Problem 2 in Lesson 5: Plots equation of state for ammonia over selected range of pressure and temperature using van der Waal's equation.
Solution to Problem 3 in Lesson 5: Plots implicit solution to a given IVP.

Solution of Linear/Nonlinear Equations
Illustrates basic ideas behind the LU Decomposition method discussed in Lesson 6.
Illustrates the Successive Relaxation (SR) method for a simple 3rd order system.
Solves a nonlinear 3rd-order system using the Linearized Iteration Method.
Solves a nonlinear 3rd-order system using Newton's Method.
Solves a nonlinear 3rd-order system using Matlab's built-in fsolve function.
Solution to Problem 1 in Lesson 6: Finds the current flows in a particular 4-loop resistive network.
Solution to Problem 2 in Lesson 6: Computes the surface area of a cylindrical fin with a parabolic profile as a function of the fin's length.
Solution to Problem 3 in Lesson 6: This file illustrates the finite difference (FD) method for solving nonlinear BVPs. In particular, it uses the Linearized Iteration Method to solve a nonlinear rectangular fin heat transfer problem.

Basic Statistics and Curve Fitting Techniques
Solution to curve fitting example involving experimental data for the thermal conductivity of UO2.
Multiple linear regression example for a simple function of two variables, f(x,y).
Compares two curve fits for an exponential (i.e. nonlinear) math model of radioactive decay: one uses a linear fit to the transformed exponential decay model, and the other makes direct use of Matlab's nlinfit nonlinear fitting routine.

Note: Additional detailed Illustrative Applications are also available for each lesson. These examples have been included in a series of separate files that cover a variety of topics, with the full development of the problem, the implementation of a solution algorithm within Matlab, and a brief discussion and interpretation of the results from the analysis. These detailed "case studies" represent a major additional resource for this course, and you should definitely review some of these cases and use them, as appropriate, to help in your understanding of using Matlab as a problem-solving tool and as additional examples of the various numerical techniques introduced in this course.

Last updated by Prof. John R. White (February 2020)

Last | Top | Next

 
 
Main | Current | Courses | Research | Vitae | Goodies