Matlab for the Behavioral
Sciences:
How to program your own experiment.
PSYCH
448 (undergrads) / 538 (graduate students)
Winter 2008
Suitable for graduate students and advanced undergraduates considering
graduate school in the behavioral sciences
Description: This class will be a tutorial for programming techniques
in Matlab that are particularly relevant to researchers in behavioral
sciences. The class will give a researcher with no or little experience
in programming the tools they need to design and program their own
experiment, do basic analysis, and plot their results. For example, we
will include classes on experimental design, stimulus presentation,
experimental timing, graphical user interfaces, curve fitting,
randomization techniques, basic statistics, and customized data
plotting, debugging and code optimization techniques.
Almost all experiments in the behavioral sciences have a certain
structure.
Some sort of stimulus is displayed, the subject makes some sort of
response, a new stimulus is presented that may or may not depend on the
subjects' response. At the end of the experiment the data needs to be
saved and analyzed. This class will step through these various stages
of a typical program. By the end of the class, the student will not
only have the programming knowledge she needs to develop a working
program, she will have already written several working programs typical
of a wide variety of behavioral science experiments.
In each class, I will explain basic techniques and commands and provide
code examples. Homeworks will practice and build on these skills.
Optional homeworks will include more advanced topics and techniques.
Each class will build on the core material of the class before.
The class is based on a book that Ione Fine and Geoffrey Boynton are
writing, and the notes for the class is the manuscript draft for the
book.
The
EPOST discussion group is HERE
What
is programming (print out and bring to class on
1/08/2008)
Matrices
and Calculations (print out and bring to class on
1/08/2008 & 1/10/2008)
Basic
graphics (print
out and bring to class on 1/15/2008)
Making
a gabor (print
out and bring to class on 1/15/2008 & 1/17/2008)
FaceAdaptation1
(print out and bring to class on 1/17/2008).
You will also need the following image files: FaceImages.zip.
Unzip and put the folders (morph, male and female) in the same
directory as FaceAdaptation.m.
Functions (print out
and bring to class on 1/22/2008)
Psychtoolbox (print
out
and bring to class on 1/24/2008)
FaceAdaptation
with Psychtoolbox (print
out
and bring to class on 1/29/2008)
KeyPresses
(print
out
and bring to class on 1/29/2008)
FinalFaceAdaptation
(also see Homeworks)
Copy of working code - FinalFaceCode.zip
Sound (print
out and bring to class on 2/5/2008)
BasicPlotting
(print
out and bring to class on 2/7/2008)
MorePlotting
(print
out and bring to class on 2/7/2008)
You'll also need the following two functions:
logx2raw.m
logy2raw.m
DataInDataOut
(print
out and bring to class on 2/12/2008)
Also download these files and put them in the same directory as
DataInDataOut
MiscFiles.zip
CosmoQuiz
Tracing
a neuron and the actual m-files
CollateRats and
the actual m-files
Calibration
(print
out and bring to class on 3/5/2008)
Fitting
code from Geoff
Monte-Carlo
(print
out and bring to class on 3/11/2008)
Homeworks