Psyc770: MATLAB for Psychologists
Fall 2019

Syllabus #1
(Click here for ELECTRONICS syllabus)
Last updated 8/12/2019



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

MATLAB for Psychologists (M4Psych) Tutorial
(August 29 - September 12)

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

COGENT 2000 (C2K) Programming
(October 8 - October 31)

Cogent 2000 User's Manual
10/8 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/10 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/15 Loading data from a file (3.3); Writing data to disk files (3.9-3.10); C2K Chap. 3.3-3.5
10/17 Presenting visual stimuli (3.4)5; Play a movie homer.jpg
playmovie.m  movie.avi
10/22 Handling keyboard responses (3.5) waitEsc.m scanEsc.m
10/24 Handling mouse input (3.7); Stimulus timing issues (3.8);
Some add-on software for interfacing with a Joystick (JoyMEX)
Using the USB Joystick as an interface to VR 3D-Engines (e.g., Unity)
Bodnar-BU0836A   Bodnar_Instructions  Chairiot-VR-Navigation
C2K Chap. 3.7-3.9
tracking.m   Mouse.m
joytestloop.m  Joytest.m
10/29 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/31 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 R2015a 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.