9/7/2001
CS 461, Copyright G.D. Hager
Matlab Basics
• Starting, stopping, help, demos, math, & variables
• Matrix definition and indexing
See Assignment 1, part 1 for a more thorough introduction.
> >   A =  [ 1   2   3  ;  4   5   6 ; 7   8   9 ]
or
1  2  3
4  5  6
7  8  9
> >   A(3,2)
> >   A(3,:)
> >   A(3,1:2) =  [ 0  0 ]
> >   A’
How would you set the middle row to be the first column?
> >   A(:,:,2) = A
> >   size(A)