Psyc770: MATLAB for Psychologists
Fall 2017

Syllabus #1
(Click here for ELECTRONICS syllabus)
Last updated 10/2/2017



8/22 Overview of MATLAB and COGENT 2000 as a Real-Time Psychology Research Platform
Installation of MATLAB on Windows 2000/XP/VISTA/7

MATLAB for Psychologists (M4Psych) Tutorial
(August 24 - September 7)

MATLAB for Psychologists
M4Psych Data Sets
8/24 Lesson (1) MATLAB Basics; (2) Matrix notation; Array Editor; (3) Matrix Indexing; (4) Math operations; (5) Matrix operators Exercises A & B
8/29 Lesson (6) Logical operators; (7) Dealing with missing data3 Exercises C & D
8/31 Lesson (8) Basic graphs and plots4; (9) Editing Matlab scripts (m-files) Exercise E  Exercise2.mat
9/5 Lesson (10) Flow control; (11) Custom Matlab functions; (12) File I/O Exercise F
9/7 Complete M4Psych Tutorial on your own during the Electronics Intersessions (6-11)  

COGENT 2000 (C2K) Programming
(October 3 - October 26)

Cogent 2000 User's Manual
10/3 Introduction to the Cogent Graphics system for behavioral research; Cogent 2000 interface to Cogent Graphics
Two Case Study: (1) A very simple stimulus loop (see ~\Samples\sample1.m)
(2) A more complex example
C2K Chap. 1
10/5 Basic structure of a C2K script (2): Configure Cogent->Start Cogent->Run experiment->Stop Cogent
Configuring/Initializing C2K resources, including: display, sound, keyboard, mouse, serial port (3.2)
USD extentions: config_io and config_ftdi
C2K Chap. 2; 3.0-3.2
10/10 Loading data from a file (3.3); Writing data to disk files (3.9-3.10); C2K Chap. 3.3-3.5
10/12 Presenting visual stimuli (3.4)5; Play a movie homer.jpg
playmovie.m  movie.avi
10/17 Handling keyboard responses (3.5) waitEsc.m scanEsc.m
10/19 Handling mouse input (3.7); Stimulus timing issues (3.8);
Some add-on software for interfacing with a Joystick (JoyMEX)
C2K Chap. 3.7-3.9
tracking.m   Mouse.m
joytestloop.m  Joytest.m
10/24 Presenting sound stimuli (3.6); Interfacing with a lab instrument using the serial (COM1:) port C2K Chap. 3.6 & 3.11
sounddemo.m   tone1500.wav
setupCS100A.m  readCS100A.m
10/26 Port I/O: Add-on parallel port case study (3.12)
Installing & testing the IO64 extension to MATLAB/C2K [ config_io; inp(); outp() ]
High-speed USB <--> Digital I/O options (FTDI hardware and software drivers)
C2K Chap. 3.9-3.12
... Miscellaneous MATLAB programming demos... randomize_matrix.m
slideshow.m  words.txt

01. All students should create a directory named C:\MATLAB770 which will serve as the home directory for course related materials.
02. COGENT 2000 should be installed in a directory name "C:\cog2011".
03  The special operators for dealing with NaN data (i.e., nansum, nanmean, nanstd) discussed at the top of p.11 are NOT part of the basic MATLAB distribution.  You must have installed the Statistics Toolbox to have access to these commands.
04.  Errata on page 12 in M4Psych tutorial:  "subplot(2,2,1)" on 9th line from bottom should be "subplot(2,1,2)".
05.  Errata at bottom of page 19 of C2K User Manual...Line should read: IA=A(size(A,1):-1:1,:,:);

Required Software Application for PSYC770

MATLAB R2012b or later
Student Version

Available directly from the Mathworks (Purchase the $99 student version).
Caution: It's a little complicated to order the student version.  Follow the Mathworks link above then:
Click 'Buy Now' button; click 'View other license options' link; click 'Request a quote' under the Classroom License category.