1369.pdf

2
1 Introduction to Matlab & Psychtoolbox 200.127.12 Intersession 2015 Instructor Zheng Ma 3 rd year graduate student in Department of Psychological and Brain Sciences Course Description This course is designed for psychology and cognitive science major students who are interested in programming for experimental tasks and data analysis. We will first cover some basic knowledge of Matlab, including matrix, arithmetic operations, conditional and iteration execution. Then we will cover some major functions of Psychtoolbox and start to develop full experimental tasks. Students will be able to independently realize experiment designs with Matlab Psychtoolbox. Students with different levels of programming background are welcome. There is no specific textbook. For more information about psychtoolbox, you can go to http://psychtoolbox.org/HomePage. There are many useful information. Doing exercise questions plays an important role in understanding course materials. In fact, you can never really learn a programming language until you starting to practise and use it. Therefore, after each class, there will be practise questions for you to finish. At the end of the 2-week course, there will be a ‘final practise’ in which you will need to program a simple experiment. This is a Pass or Fail class. In order to get a pass, you will need to finish a simple experiment and present it at the last day of the class. The experiment could be anything you like. You can get the idea from any papers you have read, or from your own interest. There are only three requirements for your experiments: 1) there should be something (visual stimuli) presented to the participants; 2) you should get responses from participants; 3) there should be at least 2 trials. Hope everyone will have a great time in this class! Have fun!

Transcript of 1369.pdf

  • 1

    Introduction to Matlab & Psychtoolbox 200.127.12

    Intersession 2015 Instructor Zheng Ma 3rd year graduate student in Department of Psychological and Brain Sciences Course Description

    This course is designed for psychology and cognitive science major students who are interested in programming for experimental tasks and data analysis. We will first cover some basic knowledge of Matlab, including matrix, arithmetic operations, conditional and iteration execution. Then we will cover some major functions of Psychtoolbox and start to develop full experimental tasks. Students will be able to independently realize experiment designs with Matlab Psychtoolbox. Students with different levels of programming background are welcome.

    There is no specific textbook. For more information about psychtoolbox, you can go to http://psychtoolbox.org/HomePage. There are many useful information.

    Doing exercise questions plays an important role in understanding course materials. In fact, you can never really learn a programming language until you starting to practise and use it. Therefore, after each class, there will be practise questions for you to finish. At the end of the 2-week course, there will be a final practise in which you will need to program a simple experiment.

    This is a Pass or Fail class. In order to get a pass, you will need to finish a simple experiment and present it at the last day of the class. The experiment could be anything you like. You can get the idea from any papers you have read, or from your own interest. There are only three requirements for your experiments: 1) there should be something (visual stimuli) presented to the participants; 2) you should get responses from participants; 3) there should be at least 2 trials.

    Hope everyone will have a great time in this class! Have fun!

  • 2

    Course Schedule: *This is only a tentative schedule. We may adjust course content based on our progress and the requirement from students. Days Topics You will be able to

    1 Intro Variables, matrices and basic calculations Scripts and Functions

    Build Matlab scripts and functions to do simple computations with variables and matrices

    2 General programming logic Conditional execution (if statements) Iteration (for, while statements)

    Use loops and conditional execution to do complex computations

    3 Basic statistics calculation Plotting figures Intro to Psychtoolbox

    Get descriptive statistics and do hypothesis testing, make figures with Matlab

    4 Screen Function

    Open experiment windows, draw simple stimuli, including shapes and pictures We may also cover auditory presentation upon requests You need to start thinking about a simple experiment

    5 Getting participants responses Experiment logic

    Get responses with both keyboard and mouse Know how to think about programming a real experiment Make 1-trial experiments Start preparing for the final experiment

    6

    Counterbalance conditions Randomization Save experiment results Debug experiment

    Know how to make an experiments with multiple conditions, randomize trials and save results Know how to check whether an program is correct

    7 Demo script (TBA, probably discussing

    on one of the classic psychology experiments, e.g. Posner cueing paradigm)

    Apply knowledge to real experiments

    8 Experiments presentation Discussion Have your own experiment ready