Home

Welcome to Matlab Fun! (Also known as COGS 119/219 at UC San Diego)

NEWS: COGS 119 is offered Spring 2019 (TuTh 3:20pm-4:50pm ~ CSB 115)

COGS 119:  The course is taught once a year whenever possible, usually in the Fall quarter. If you are an undergraduate or visiting student interested in research, try to enroll in the course as early as possible during your studies so that you can benefit from the skills you learn while still at UCSD. While there is nothing wrong with taking the course as a senior, juniors and sophomores (and even a few freshmen!) who took the course have found it very useful for getting involved in significant research projects, honors theses, research fellowships, and even finding employment. If you are worried about not having sufficient background, talk to the professor; depending on your background and goals, we can suggest taking it later vs. waive prerequisites.

COGS 219:  The course is taught once a year whenever possible, usually in the Fall quarter so that students can use the course to make progress in their research (e.g., lab rotations, second year projects, thesis research). For further details, please see the syllabus or speak to the instructor.

Goals

Researchers often say that they wished they had the opportunity to take courses that helped them to acquire the actual skills needed for their research. MatlabFun was developed to address just this need: This is a course developed for undergraduate and graduate students in the behavioral sciences (broadly construed, including cognitive science, neurosciences, psychology, neuropsychology, linguistics, and related fields) or those from computational, clinical, or biomedical fields (e.g., computer science, bioengineering, data science, robotics, neurobiology, neurology, clinical psychology, psychiatry, radiology, speech/language therapy,  etc.) who would like to learn more about or collaborate with behavioral scientists working with human or animal subjects/data. Although the course is offered for UC San Diego students, it has been found useful even by experienced scientists with PhDs who have taken or sat in on it, such as postdoctoral researchers and even professors, one of the latter even endorsing it as “The best course I have seen in my life!” (Professor Stuart Anstis, Dept of Psychology, UC San Diego).

The goal of this course is to help students learn how to program computers specifically as applied to experimental/behavioral research, broadly construed. Currently we use Matlab and the Psychophysics Toolbox (PsychToolbox). Matlab is a programming platform used in a wide variety of settings worldwide both in academia and industry. PsychToolbox is a (free) set of programs developed by and for experimental researchers and their collaborators to make it easier to achieve excellent and precise control of computer hardware (which in turn enables precise and reliable presentation of stimuli, accurate timing, etc.). Other toolboxes and materials may also be introduced.

This is an applied, hands-on, lab-based class. The goal is to develop skills that students can see and use. Our focus will be on programming for designing behavioral studies, running experiments, collecting and/or analysing data from human or animal subjects. In addition to increasing students’ mastery of MATLAB and PsychToolbox, students will learn valuable approaches that transfer to future programming tools they may use in ther studies and beyond. In addition materials covered in lecture and lab format, the course involves a project, which introduces opportunities to learn about additional topics, and to develop computational skills not covered in class. At the end of the semester, students will have a “behind-the-scenes” understanding of experimental research. They will not only have learned how to program for this kind of work, they will also have developed a repertoire of programs they can adapt for new purposes in the future. Students will also feel more confident in their programming ability and computational skills and of experimental research more broadly. Throughout, the course also introduces and/or reinforces important concepts for research.

An ever-increasing need for skilled individuals with interdisciplinary skills in both academia and industry, plus the widespread use of MATLAB, graduates of the class have found it beneficial in a variety of settings, whether in their studies or after graduation, in academic research and industry. The skills acquired in this course have made them more competitive for research assistantships, fellowships, internships, graduate school and industry jobs.

About the Course

The course was developed by Prof. Ayse Saygin and has been offered at UC San Diego since 2010. We are continually trying to improve the course based on student needs and feedback. No course can “teach” programming skills and ours is not an exception. Rather, the goal is to enable you to acquire these skills. As with music or sports, programming is a skill that requires practice. Rather than a typical lecturer, it may be more beneficial to think of us as a sports coach, personal trainer, or piano teacher. Although there are lectures and materials we will present, participation and work of students is essential for making progress. We will provide information, support, motivation, structure, experience and guidance. You will be doing the work, and over the quarter, incrementally, you will see that you are acquiring skills you can use at school and beyond. You will see the fruits of your labor (as well as earn your grade) throughout the course and with the end-of-quarter project. Then we will all feel proud of you!

 

Syllabus and course info is being updated for Fall 2018.

Students enrolled in the class, remember this simple policy: When in doubt, read the syllabus (WIDRTS)!

What kinds of things can be done with Matlab? Below is a video I made from an experiment I programmed using Matlab and the Psychophysics Toolbox several years ago. The visual stimuli are made from point-light biological motion. The visual stimuli were used in a functional magnetic resonance imaging (fMRI) experiment we ran here at UCSD. The song is “It’s Raining Men” by The Weather Girls – it was not part of the experiment, but was added just for fun. The details of this experiment have been described in detail in our paper in Cerebral Cortex, which you don’t have to read, but can have a look if you’re wondering the purpose of the program. The main point here is to show you an example of what can be done with Matlab and Psychtoolbox, the tools you will learn in this class.

By the end of the class, you too will be able to program your own raining men or women or cats or dogs, more importantly, your own experiments. The course’s final consists of presentations/demos of your final project, where you will vote on a competition for the best program!