MATLAB Graphics Animation Tutorial
MATLAB Graphics Animation Tutorial
Recitation Materials #2
Date: 9/5/2006
1 MATLAB Review
In this recitation, we will give you some idea in programming with MATLAB. Beside,
we will set the standard in naming files, and how a program should be written for this
class.
MAE#12_HW#_Problem#_FirstnameLastname.m
Explain as follow:
MAE#12 –MAE512 if you are graduate student, MAE412 if you are
undergraduate student.
HW# - Homework #, write in 00, 01, 02 format.
Problem# - The problem number, with sub-number sometime, e.g. 1a, 1b, etc.
FirstnameLastname – Student first name and last name, no space between them,
and capitalize the initials.
Example: MAE512_HW01_Problem1c_LengFengLee.m
Note: This way of documentation is based on personal experiences, if you done are a
computer science major and have better idea of doing this. Please let me know as well.
From the way you document your code, it can help you organizing the algorithm to solve
the problem and also your own thoughts in writing a ‘structure’ program.
It expanded so much and so wide spread in many fields, that as an engineer/ researcher/
graduate student, you should know it!
Use of “help” command in the command prompt – though you might not fully understand
its descriptions sometime when you are not familiar with MATLAB, you need to try to
understand them. As more you do this, you will eventually get used to it and the “help”
command is really helping you to understand the use of new functions.
This course will only shows you a fraction of what MATLAB can do… but will help you
in your future research/ courses/ job/ etc. We also assume you to have basic programming
knowledge, such as writing structured algorithm, know the use of for-loop, if-else, and
the how data were stored: vector/ matrix.
There is no way we can show you all the use in MATLAB, but here we try to show you
some basic thing you can do with MATLAB. Always remember, there are different ways
to code up a program, and MATLAB have many ‘smart-way’ or ‘short-way’ that a
multiple line command can be replaced by a single line command and gives the same
result – as you get to learn more and more about it, you will learn them.
Note that there are many ‘options’ that you can set for creating an avi movie, and there
are many features that you can control… these will not be shown here so that you can
explore it yourself and actually learn it.
Note:
1. This document only serve as a supplement to the class-notes and textbooks,
the author is not responsible for any mistake that may occur in this document.
2. This document is created for your convenient, and is NOT a substitute for you
to absence from recitation hour. If student abuse its use, there will be no more
material provided in the future.