Matlab Overview

If you want to get started with Matlab try the good interwikitutorial from Ione Fine at UCSD/Salk. The following pages assume that you have installed a recent version of Matlab und the PsychToolbox.

If you do not know what Matlab is try TwoPlusTwo first. Then you may try the demos. To get an impression of the plotting capabilities of Matlab look for "Matlab", then "Graphics" and select "2D-Plots" and thereafter "3D-Plots". The Matlab help has a very good tutorial on creating plots: choose "Matlab Help" from the help menu and go to "Graphics | Basic Plotting".

Matlab Toolboxes

MatlabToolboxes?

PsychToolbox Experiments

If you want to learn how to use Matlab to program your experiments you can start with the chapter about reading and writing files (MatlabDataFiles), write your own first MatlabFunction and learn how to make noise (MatlabSound).

With the PsychToolbox you have a lot more options: e.g. to query the keyboard (PsychToolboxKeyboard) or to display something on your monitor in real time (PsychToolboxDisplay).

MatlabExperiment explains how condition variables and blocks can be programmed.

Marias Experiment

A very nice and straightforward experiment is presented in the following interwikim-file. The subject will tell its three most loved music songs prior to the experiment. These song title will be entered into a text file . In the experiment itself, a song title will be presented and the subject should then try to remember that song. There are three conditions of the imagination phase: no disturbance, loud organ music and a condition when the subject must blow through a straw. The experiment was programmed with the PsychToolbox and commented in German.

interwikiattachment:singen3.m shows the design of the experiment without any PsychToolbox functions.

interwikiattachment:singen2.m measures key presses with KBCHECK and KBWAIT.

interwikiattachment:singen1.m will record the first 3 seconds of your singing, save it and the reaction times to a result file.

interwikiattachment:singen.m is the full experiment including instruction and condition screens programmed with the SCREEN function of the PsychToolbox.

Download the four files to your current Matlab directory. Run them one by one from singen3 to singen1 and try to change some of the source code with EDIT.

>> help singen(3)

[...]

>> singen3(1)

[...]

>> edit singen3


Last edited on Wednesday, June 25, 2003 5:33:42 pm.

Valid XHTML 1.0! Valid CSS!
Page Execution took 2.85 seconds