Appendix C
Introduction to MATLAB®
MATLAB® is an abbreviation for MATrix LABoratory. It is a very powerful mathematical tool used to perform numerical computation using matrices and vectors to obtain two- and three-dimensional graphs. MATLAB can also be used to perform complex mathematical analysis.
Getting Started
1. Open MATLAB by clicking Start
Programs
MATLAB
R2006a
MATLAB R2006a.
2. Open a new M-file by clicking File
New
M-File.
3. Type the code in the M-File.
4. Save the file as fn.m (e.g., Lab1.m).
5. Simulate the code by doing one of the following:
(a) Click on Debug
Run.
(b) Press F5
(c) On the tool bar, click the icon Run.
Use HELP by pressing F1.
Use % at the beginning of a line for comments.
Generating a -axis Data
x=Initial-Value: Increment:Final-Value;
Example:
x=1:0.001:5; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access