I hear and I forget.
I see and I remember.
I do and I understand.
Confucius1
The creation of this book stems from a set of courses offered over the past several years in quantitative neuroscience, particularly within the graduate program in computational neuroscience at the University of Chicago. This program started in 2001 and is one of the few programs focused on computational neuroscience with a complete curriculum including courses in cellular, systems, behavioral, and cognitive neuroscience; neuronal modeling; and mathematical foundations in computational neuroscience. Many of these courses include not only lectures but also lab sessions in which students get hands-on experience using the MATLAB® software to solve various neuroscientific problems.
The content of our book is oriented along the philosophy of using MATLAB as a comprehensive platform that spans the entire cycle of experimental neuroscience: stimulus generation, data collection and experimental control, data analysis, and finally data modeling. We realize that this approach is not universally followed. Quite a number of labs use different—and specialized—software for stimulus generation, data collection, data analysis, and data modeling, respectively. Although this alternative is a feasible strategy, it does introduce a number of problems: namely, the need to convert data between different platforms and formats and to keep up with a wide range of software packages as well as the need to learn ever-new specialized home-cooked “local” software when entering a new lab. As we have realized in our own professional life as scientists, these obstacles can be far from trivial, constitute a significant detriment to productivity and are the root cause of many a conniption.
We also believe that our comprehensive MATLAB “strategy” makes particular sense for educational purposes, as it empowers users to progressively solve a wide variety of computational problems and challenges within a single programming environment. It has the added advantage of an elegant progression within the problem space. Our experience in teaching has led us to this approach that focuses on the inherent structure of MATLAB not as a computer programming language, but rather as a tool for solving problems within neuroscience. In addition, it is well founded in our current understanding of the learning process. Constant use of the information forces the repeated retrieval of the introduced concepts, which—in turn—facilitates learning (Karpicke and Roediger, 2008).
The book is structured in four parts, each with several chapters. The first part serves as a brief introduction to some of the most commonly used functions of the MATLAB software, as well as to basic programming in MATLAB. Users who are already familiar with MATLAB may skip it. It serves the important purpose of a friendly invitation to the power of the MATLAB environment. It is elementary insofar as it is necessary to have mastered the content within before progressing any further. Later parts focus on the use of MATLAB to solve computational problems in neuroscience. The second part focuses on MATLAB as a tool for the collection of data. For the sake of generality, we focus on the collection of data from human subjects in these chapters, although the user can easily adapt them for the collection of animal data as well. The third part focuses on MATLAB as a tool for data analysis and graphing. This part forms the core of the book, as this is also how MATLAB is most commonly used. In particular, we explore the analysis of a variety of datasets, including “real” data from electrophysiology as well as neuroimaging. The fourth part focuses on data modeling with MATLAB, and appendices address the philosophy of MATLAB as well as the underlying mathematics. Each chapter begins with the goals of the chapter and a brief background of the problem of interest (neuroscientific or psychological), followed by an introduction to the MATLAB concepts necessary to address the problem by breaking it down into smaller parts and providing sample code. You are invited to modify, expand, and improvise on these examples in a set of exercises. Finally, a project is assigned at the end of the chapter which requires integrating the parts into a coherent whole. Based on our experience, we believe that these chapters can serve as self-contained “lab” components of a course if this book is used in the context of teaching.
In essence, we strived to write the book that we wished to have had when first learning MATLAB ourselves, as well as the book that we would have liked to have had when teaching MATLAB to our students in the past. Our hope is that this is the very book you are holding in your hands right now.
We could have not written this book without the continuous support of a large number of friends. First and foremost, we would like to thank our families for their kind support, their endless patience, as well as their untiring encouragement. We also would like to extend thanks to our students who provided the initial impetus for this undertaking as well as for providing constant feedback on previous versions of our manuscript. Steve Shevell deserves thanks for suggesting that the project is worth pursuing in the first place. In addition, we would like to thank everyone at Elsevier who was involved in the production and development of this book—in particular our various editors, Johannes Menzel, Sarah Hajduk, Clare Caruana, Christie Jozwiak, Chuck Hutchinson, Megan Wickline, and Meg Day—their resourcefulness, professionalism and patience really did make a big difference. Curiously, there was another Meg involved with this project, specifically Meg Vulliez from The MathWorks™ book program. In addition, we would like to thank Kori Lusignan and Amber Martell for help with illustrations, and Wim van Drongelen for advice and guidance in the early stages of this project. Moreover, we thank Armen Kherlopian and Gopathy Purushothaman, who were kind enough to provide us with valuable insights throughout our undertaking. We also would like to thank Kristine Mosier for providing the finger-tapping functional magnetic imaging data that we used in the fMRI lab, and would like to thank Aaron Suminski for his help in the post-processing of that data. Importantly, we thank everyone whom we neglected to name explicitly, but who deserves our praise. Finally, we would like to thank you, the reader, for your willingness to join us on this exciting journey. We sincerely hope that we can help you reach your desired destination.
The authors
1In the West, this quote is commonly attributed to Confucius. However, in China itself, it is often pointed out (and it has been brought to our attention by Qian Cheng) that a very similar saying goes back to the Chinese philosopher Xunzi. While there is some controversy regarding whether similar sayings originated multiple times, there is no question that Confucius is a quote magnet. In the case of Einstein, this has been modeled. If current trends continue, it is not unlikely that over time, all quotes will be attributed to him. Be that as it may, we find the saying to be truthful, regardless of its source. It is an attempt at attribution, not an implicit argument from authority.