1
Linear Algebra with Application to
CME200
Engineering Computations
M. Gerritsen
Autumn 2006
Handout 3
A brief introduction to
MATLAB
0.0137 0.0135 0.0133 0.0132 0.0130 0.0128 0.0127 0.0125
0.0139 0.0233 0.0227 0.0222 0.0217 0.0213 0.0208 0.0204
0.0141 0.0238 0.0476 0.0455 0.0435 0.0417 0.0400 0.0385
0.0143 0.0244 0.0500 0.1429 0.1250 0.1111 0.1000 0.0370
0.0145 0.0250 0.0526 0.1667 1.0000 0.5000 0.0909 0.0357
0.0147 0.0256 0.0556 0.2000 0.2500 0.3333 0.0833 0.0345
0.0149 0.0263 0.0588 0.0625 0.0667 0.0714 0.0769 0.0333
0.0152 0.0270 0.0278 0.0286 0.0294 0.0303 0.0312 0.0323
0.0154 0.0156 0.0159 0.0161 0.0164 0.0167 0.0169 0.0172
0.0100 0.0101 0.0102 0.0103 0.0104 0.0105 0.0106 0.0108
September 2006
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document2
MATLAB, short for MATrix LABoratory is a programming package specifically designed for quick and easy
scientific calculations and I/O. It has literally hundreds of builtin functions for a wide variety of computations
and many toolboxes designed for specific research disciplines, including statistics, optimization, solution of
partial differential equations, data analysis.
For CME200, you need a solid knowledge of basic MATLAB commands and several more advanced features
including two and threedimensional graphics, solution of algebraic equations, solution of ordinary differential
equations, calculations with matrices and solutions of linear systems of equations. Most of what you need is
discussed here, but most importantly, after this tutorial you should be able to find your way around the
MATLAB help function and browser functions to find any additional features you may need or want to use.
General directions
This is a handson tutorial. MATLAB commands for you to type are printed in
bold letters
.
Bold letters are also
used to make MATLAB expressions that are in lower case more visible when found in a sentence.
Where to find MATLAB?
For those who own a PC, the cheap student edition of MATLAB is available at the bookstore.
We recommend
you buy a copy of this version because you will likely use it throughout your Stanford career and beyond
.
If you do not have your own PC, you will find that MATLAB is available on a wide variety of platforms around
campus.
This tutorial assumes you can open the MATLAB GUI. If you are running on a UNIX machine, you can also run
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 ee221a
 matlab, disp

Click to edit the document details