about · news · calendar · photos · generic utilities · discussion forum · archives
Matlab Tutorial
Documentation

Matlab Tutorials

Since many students at CNS use MATLAB for their modeling work, and most CNS classes require students to run MATLAB simulations, the CNSO offers a tutorial for those who don't have MATLAB experience. In 2009, the tutorials tooke place on Tuesdays and Thursdays during the first two weeks of September (see the calendar). During each tutorial, several documents were used and manipulated, or created on the fly, for instruction purposes. These documents and other useful information are included below. For more reading about MATLAB, some students have found a MATLAB Quick Reference guide by Jialong He to be useful.

Introduction to MATLAB
September 4, 2007
Alex Storer

hello.m Source code generated as part of instruction.
awesomedata.mat Some mysterious data.
awesomefigure.jpg A figure generated as part of the tutorial.
cmdline.jpg A figure saved from the command line.
 
Introduction to Plotting
September 6, 2007
Jasmin Leveille

simplePlot.m Plots two datasets and formats the graph.
drawing.m Draws two geometrical shapes on top of a line plot.
fct.m Element-wise square function to be used with functionPlot.m.
functionPlot.m plots fct.m directly without requiring manual evaluation of the function.
samplePlots.m Shows examples of typical plots.
simpleNet.m Simulates and plots dynamically a simple neural net.
 
Programming Methods
September 11, 2007
Tim Barnes

m_file.m Demonstrates the basic structure of an m-file.
matlab_types.m Introduction to data types in MATLAB.
scope.m How functions encapsulate data and methods.
tricks.m Highlights a few MATLAB-centered programming tricks.
for_loop.m Program to be run in the profiler to show MATLAB overhead.
tim_demo.m Uses some of the tricks above to do fast(ish) image manipulations. Makes use of large.jpg and link.txt (below).
large.jpg An image used in tim_demo.m (above).
link.txt A text file used in tim_demo.m (above).
 
Practical Techniques
September 13, 2007
Arun Ravindran

while_related.m While loops and some related items.
file_input_output.m Nice file input/output tools that you can use from the command line in MATLAB.
misc.m Other usedul things including running m-files from the linux command prompt.
myfile.txt A text file used in file_input_output.m (above).
 
MATLAB Introductory Tutorials
September 23, 2009
Mikhail Panko

Intro to MATLAB MATLAB Introductory Tutorial covering: types of variables, basic math operations, functions, flow control tools, basic plotting, saving and loading data, and getting help.
MATLAB Advanced Tutorials
September 30, 2009
Tim Barnes

Advanced Tools This includes a GUIDE example, using ode45 and fminsearch, and an example to use with the Profiler.