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?!
M-files, debugger: product help: matlab: desktop tools...:
editing and debugging; create M-files from command window and
script file ddom.m (create A diagonally dominant),
change script file to function file
More on Functions
function handles: f=@sqrt; f(2), sqrt(2)
f=str2func('ddomaltf'); A=randn(4), f(A)