Next: 3D plots Up: Advanced Graphics Previous: Advanced Graphics
Putting several graphs in one window
The subplot command creates several plots in a single window. To be precise, subplot(m,n,i)
creates mn plots, arranged in an array with m rows and n colu
Next: Sparse matrix computations Up: Advanced matrix computations Previous: Advanced
matrix computations
Eigenvalues and other numerical linear algebra
computations
In addition to solving linear systems (with the backslash operator), Matlab performs many
Next: Sparse matrix computations Up: Advanced matrix computations Previous: Advanced
matrix computations
Eigenvalues and other numerical linear algebra
computations
In addition to solving linear systems (with the backslash operator), Matlab performs many
Next: Programming in Matlab Up: Simple calculations and graphs Previous: Vectorized
functions and operators;
Some miscellaneous commands
An important operator in Matlab is the single quote, which represents the (conjugate) transpose:
> A = [1 2;3 4]
A=
1
Next: Solving matrix equations using Up: Arithmetic operations on matrices Previous:
Arithmetic operations on matrices
Standard operations
If A and B are arrays, then Matlab can compute A+B and A-B when these operations are defined.
For example, consider
Handle Graphics: Modifying Plots
Each part of a matlab plot has some set of properties that can be changed to change its
appearance. You can create a "handle" for each part of the plot which basically lets you "grab"
that part of the plot and change some
Writing Functions and Scripts
All matlab functions and scripts are plain text files that contain matlab commands. Matlab will
treat any file that ends in .m as either a function or a script. It can find .m files you've written that
are in your ~/matlab di
The Basics
Calculator functions work as you'd expect:
>(1+4)*3
ans =
15
+ and - are addition, / is division, * is multiplication, ^ is an exponent.
You can assign variables from the matlab workspace. Everything in matlab is a matrix. (If it's a
scalar, it