MA 415_2014

Class materials

first day handout 

Course info. 

Homework Problems: All Homework Problems to hand in with the exception of 0. Review problems (never to hand in) and practice problems.

Computer Problems rules:

When submitting an assignment, please ensure that (i) everything you expect me to read is in the hardcopy, and (ii) your programs are submitted to mark.pekker@uah.edu. Please observe also the following:

  • Do not print out numbers with very long fractions unless specifically asked to do so. For accuracy checking, print errors, not solution and approximate solution values. To display data or solution tendencies etc. use plots, not long lists of numbers.
  • Running a program: use the MATLAB command 'diary' to accumulate your results in a file: type help diary. Edit the diary file and put brief statements and comments in your own words of what the results mean (just like writing a technical report about your finding). Highlight (or underline) your statements and comments and key relevant info from your results.
  • When submitting programs, use separate files for separate Matlab functions (Function Programs and/or Script Programs).

Your write-ups must conform to the following template; the order of material is NOT optional:

  • Description of the problem;
  • A self-contained Summary table of results and associated comments;
  • All Code listings (Appendix I) and all Raw output (Appendix II).

Introduction to Numerical Methods and Matlab Programming for Engineers YM.

  1. Numerical algorithms (Chapter 1) Lecture ``slides''
    Read YM, Lectures 1, 2. Homework Problems: p. 14: 0Review problems (a) - (d); 1, 3, 4. YM p. 7: 2.1, 2.2. Due W, Sept 3.
    MATLABcodes: Example1_1.mExample1_3Figure1_3.mfun1_6.m.
  2. Roundoff errors (Chapter 2) Lecture "slides''
    Homework Problems: pp. 32-35: 0. Review problems (a) - (g); 2, 11; practice problem: 12. Due M, Sept 8.
    MATLAB codesExample2_2Figure2_2.mExample2_8Figure2_3.mroundc.m.
  3. Nonlinear Equations in One Variable (Chapter 3) Lecture "slides''
    Read YM, Lectures 3 - 6. Homework Problems: pp. 58-62: 0. Review problems (a) - (k); 1, 2a,b, 4, 5, 15. Due M, Sept 29
    MATLABcodes: bisect.mbisect_recursive.mExample3_1Figure3_1.mExample3_3.mExample3_3a.m
    Example3_4Figure3_2.m Example3_5Figure3_3.mfex3.mFigure3_4.m 
    Additional  MATLAB codes/examples: bisect.m, nest.m, fpi.m, 1234, 5, 6, 7zeroseg1.mzeroseg2.mzeroseg3.m      
  4. Linear Algebra Background (Chapter 4) Lecture "slides''
    Homework Problems: pp. 89 - 90: 0. (a) - (c), 1. 
    MATLAB codes:
    Additional  MATLAB codes/examples: 
  5. Linear Systems: Direct Methods (Chapter 5) Lecture "slides''
    Homework Problems: pp. 133 - 136: 0. Review problems (a) - (d), (j), - (k); 1, 3 (hint: the amount of work for matrix-vector multiplication is O(n^2), 5, 10, 11. Due M, Oct.  20.
    MATLAB codes: ainvb.mplu.mforsub.mbacksub.m
    Additional  MATLAB codes/examples: naive.m, 1, 2, 3 
  6. Polynomial interpolation (Chapter 10) Lecture "slides''
    Homework Problems: pp. 323 - 328: 0. Review problems: (a) - (f), (h) -(o); 2a, 3 (also provide the theoretical error bound), 6, 19 (use n from 10 to 60, Lagrange form: chebl.m, lageval.m), 19 (bonus, same as before, but use Newton form and find n for which the error is min)Due W, Nov.  12.
    MATLAB codes: chebl.mdivdif.mdivdifadd.mevalnewt.m, lageval.mfunc.mExample_chebyshev_10_14.mExample10_1Figure10_2.m, Example10_4Figure10_5.m, Example10_6Figures10_6_7.mFigure10_1.m
    Additional  MATLAB codes/examples: newtdd.mclickinterp.msin1.msin2.m, 1, 2 
  7. Piecewise polynomial interpolation (Chapter 11) Lecture "slides''
    Homework Problems: pp. 359 - 363: 0. (a) - (h); 1, 6, 15a,b. Due W, Nov.  19.
    MATLAB codes: divdif.mevalnewt.mExample11_5Figure11_4.mExample11_6Figure11_5.mFigure11_3.mhermitepc.m
    Additional  MATLAB codes/examples: splinecoeff.msplineplot.m, 3, 4
  8. Numerical differentiation and integration (Chapters 14, 15)
    Homework Problems: pp. 475 - 478: 0. (a), (c) - (e), (g); 1, 7 (you can write the codes yoursaelf and/or use quadeg1.m, trapezoidal.m, simpson.m). Due M, Dec. 1.
    MATLAB codes: Example15_1Figure15_1.mExample15_2.mExample15_3Figure15_3.mExample15_13.mquade.mquads.m
    Additional  MATLAB codes/examples: trapezoidal.msimpson.m
    C. B. Moler, Numerical Computing with MATLAB, download Chapter 6: Quadrature
    MATLAB codes for Moler Chapter 6: quadgui.mpolyinterp.mquadtx.m        
    MATLAB Examples for Moler Chapter 6: quadeg1.mquadeg2.mquadeg3.mquadeg4.m

 

 

Least squares (Chapter 4) 
Homework Problems: Sec. 4.1: 1, 3, 8a,b, Computer Problem 1; Sec. 4.2: 3. 


Supplementary materials

MATLAB Tutorial (Ed Overman)

Matt Dunham and Kevin Murphy https://code.google.com/p/yagtom/

Elementary MATLAB Tutorial

 -----------------------------------------------------------------------------------------------------

Basic MATLAB read from: MATLAB Tutorial (Ed Overman)

1.7 Script M- les . . . . . . . . . . . . . . . . . . . . . 14
3.1 Anonymous Functions . . . . . . . . . . . . . . . . . .. . 40
3.2 Passing Functions as Arguments . . . . . . . .. . 41

8 Programming in MATLAB . . . . . . . . . . . . . . . . . . . . 91
8.1 Flow Control and Logical Variables . . . . . . . . . . . 91
8.2 Matrix Relational Operators and Logical Operators . . 96
8.3 Function M- les . . . . . . . . . . . . . . . . . . . . .. 100
8.4 Odds and Ends . . . . . . . . . . . . . . . . . . . . . . 113

------------------------------------------------------------------------------------------------------

MATLAB notes,

MATLAB Tutorial

MATLAB primer

Crash Course in MATLAB, by Tobin Driscoll, University of Delaware

more MATLAB Resources