This interactive seminar will provide an introduction to the powerful
computing environment of MATLAB and demonstrate the tools needed for
conducting research in combinatorics and optimization using MATLAB.
The first 50 minutes will focus on some of the basics of MATLAB, from
entering matrices, solving linear systems, and calculating
eigenvalues, to using the graphical features of MATLAB for plotting
functions and even graphs.
The second 50 minutes will look at writing
your own MATLAB programs (M-files), using symbolic MATLAB, and solving
both discrete and continuous optimization problems.
Solve a system of linear equations: x=A\b
(demo with roundoff error example)
Try the test example file Asolve.m.
(Or use runAs.m.)
Now try the sample file Aoneseps.m.
(Or use runeps.m.) Can you explain the large error?!
(Exercise)
M-files, debugger: product help: matlab: desktop tools...:
editing and debugging; create M-files from command window and
history;
script file ddom.m (create A diagonally dominant),
ddomalt.m
change script file to function file
ddomaltf.m
More on Functions
function handles: f=@sqrt; f(2), sqrt(2)
f=str2func('ddomaltf'); A=randn(4), f(A)
Go to Demos (e.g. start at BL)
-->
toolboxes
-->
optimization
-->
minimizing an expensive .... using parallel computing ...
Cut and paste from the demo window.
The tutorial contains info on various packages, for small and large scale problems:
fminunc (unconstrained optimization)
linprog (Linear programming)
quadprog (Quadratic programming)
lsqlin (Constrained linear least squares)
fmincon (Constrained programming)
optimtool (Optimization Toolbox Graphical User Interface)