matlab_self_guided_course

advertisement
MatLab = “Matrix Laboratory”
Plan of Study
The four sessions are designed to be work-at-your-own-pace tutorials and assumes no prior
programming knowledge. The 1st lesson slowly introduces the student the MatLab environment. The 2nd
& 3rd lessons provide demonstration scripts that the student must modify for practice. The 4th lesson
provides mini-projects allowing the student to tie together the concepts they have learned.
Why MatLab?
o
o
o
o
o
o
o
MatLab handles arrays (boxes of numbers) in a simple way.
MatLab prepares you for more advanced languages like C++ and FORTRAN.
MatLab has a well-designed user interface for easy and speedy programming.
Engineers & scientists use MatLab for small, quick projects.
MatLab has built in graphics unlike C++ and FORTRAN.
MatLab tells you where the error is and is very quick to debug.
Remember, human time is more valuable than computer time. Often an easier programming
language is better than a more powerful language.
o Other tutorials at: http://msg.byu.edu/matlab/index.html &
http://www.physics.byu.edu/Courses/Computational/phys430.aspx > Introduction
Learning Objectives
o Participants become proficient with quick use of MatLab visualization tools (2-D and 3-D) for
future scientific work (& future science course homework).
o Participants develop better understanding of fundamental linear programming techniques for
immediate use in MatLab and C++ programming. This includes among others
o array manipulation
o if-then logic
o while loops & for loops
o creating subroutines
o porting data
o Participants are immediately useful to faculty advisers in computational aspects of research.
Lesson Contents
Lesson 1
o Using MatLab as a calculator at the command line in the command window.
o Arithmetic.
o Variables.
o Symbolic and help menu.
o Linear algebra.
o Arrays.
o Simple 2-D plotting.
o Introduction to scripting with M-files.
o Intro to 3-D plotting: surf.
o User input.
o If-then logic.
o Numbered loops.
Lesson 2
o
o
o
o
o
o
Review simple 2-D plotting, legends.
More 3-D graphing: surfc, contour, plot3, colormaps.
While loops.
Outputting data to files.
Inputting data to files.
Inline Functions.
Lesson 3
o
o
o
o
More 3-D graphing: isosurface.
Multiple graphs: separate figures vs. subplots.
Running M-file programs within other M-files.
M-file functions.
Lesson 4
o Targeted practice with mini-projects.
Download