Matlab Tutorial and Examples for Fall 2012 MAE 107


Mr. Gao's tutorial from 2011 may be found here in pdf format.

Examples of MATLAB Code:

  • Some example codes using Euler's method for solution of an ODE are easyeuler and odefunc.
  • They have been copied from .m format to .rtf format so that the color-coding shows.
  • Note the format used for "commenting" the code; you should follow these commenting examples for full credit.

  • Example codes for derivative approximation by finite difference:

  • test_derivbydiff_2methods_v2 matlab code.

  • derivbydiff_2methods_v2 matlab code.

  • functioninderiv matlab code.