You are previewing MATLAB for Neuroscientists, 2nd Edition.
O'Reilly logo
MATLAB for Neuroscientists, 2nd Edition

Book Description

MATLAB for Neuroscientists serves as the only complete study manual and teaching resource for MATLAB, the globally accepted standard for scientific computing, in the neurosciences and psychology. This unique introduction can be used to learn the entire empirical and experimental process (including stimulus generation, experimental control, data collection, data analysis, modeling, and more), and the 2nd Edition continues to ensure that a wide variety of computational problems can be addressed in a single programming environment.

This updated edition features additional material on the creation of visual stimuli, advanced psychophysics, analysis of LFP data, choice probabilities, synchrony, and advanced spectral analysis. Users at a variety of levels—advanced undergraduates, beginning graduate students, and researchers looking to modernize their skills—will learn to design and implement their own analytical tools, and gain the fluency required to meet the computational needs of neuroscience practitioners.



  • The first complete volume on MATLAB focusing on neuroscience and psychology applications
  • Problem-based approach with many examples from neuroscience and cognitive psychology using real data
  • Illustrated in full color throughout
  • Careful tutorial approach, by authors who are award-winning educators with strong teaching experience

Table of Contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Preface to the Second Edition
  6. Preface to the First Edition
  7. About the Authors
  8. How to Use this Book
    1. Structural and Conceptual Considerations
    2. Layout and Style
    3. Companion Web Site
  9. Part I: Fundamentals
    1. Chapter 1. Introduction
    2. Chapter 2. MATLAB Tutorial
      1. 2.1 Goal of this Chapter
      2. 2.2 Purpose and Philosophy of MATLAB
      3. 2.3 Graphics and Visualization
      4. 2.4 Function and Scripts
      5. 2.5 Data Analysis
      6. 2.6 A Word on Function Handles
      7. 2.7 The Function Browser
      8. 2.8 Summary
      9. MATLAB Functions, Commands, and Operators Covered in This Chapter
    3. Chapter 3. Mathematics and Statistics Tutorial
      1. 3.1 Introduction
      2. 3.2 Linear Algebra
      3. 3.3 Probability and Statistics
      4. MATLAB Functions, Commands, and Operators Covered in This Chapter
    4. Chapter 4. Programming Tutorial: Principles and Best Practices
      1. 4.1 Goals of this Chapter
      2. 4.2 Organizing Code
      3. 4.3 Organizing More Code: Bigger Projects
      4. 4.4 Taming Errors
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    5. Chapter 5. Visualization and Documentation Tutorial
      1. 5.1 Goals of This Chapter
      2. 5.2 Visualization
      3. 5.3 Documentation
      4. MATLAB Functions, Commands, and Operators Covered in This Chapter
  10. Part II: Data Collection with MATLAB
    1. Chapter 6. Collecting Reaction Times I: Visual Search and Pop Out
      1. 6.1 Goals of this Chapter
      2. 6.2 Background
      3. 6.3 Exercises
      4. 6.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    2. Chapter 7. Collecting Reaction Times II: Attention
      1. 7.1 Goals of this Chapter
      2. 7.2 Background
      3. 7.3 Exercises
      4. 7.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    3. Chapter 8. Psychophysics
      1. 8.1 Goals of this Chapter
      2. 8.2 Background
      3. 8.3 Exercises
      4. 8.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    4. Chapter 9. Psychophysics with GUIs
      1. Abstract
      2. 9.1 Goals of This Chapter
      3. 9.2 Introduction and Background
      4. 9.3 GUI Basics
      5. 9.4 Using a GUI to Track an IP Address
      6. 9.5 Using a GUI for Psychophysics
      7. 9.6 Project
      8. MATLAB Functions, Commands, and Operators Covered in This Chapter
    5. Chapter 10. Signal Detection Theory
      1. 10.1 Goals of This Chapter
      2. 10.2 Background
      3. 10.3 Exercises
      4. 10.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
  11. Part III: Data Analysis with MATLAB
    1. Chapter 11. Frequency Analysis Part I: Fourier Decomposition
      1. 11.1 Goals of this Chapter
      2. 11.2 Background
      3. 11.3 Exercises
      4. 11.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    2. Chapter 12. Frequency Analysis Part II: Nonstationary Signals and Spectrograms
      1. 12.1 Goal of this Chapter
      2. 12.2 Background
      3. 12.3 Exercises
      4. 12.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    3. Chapter 13. Wavelets
      1. 13.1 Goals of This Chapter
      2. 13.2 Background
      3. 13.3 Exercises
      4. 13.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    4. Chapter 14. Introduction to Phase Plane Analysis
      1. 14.1 Goal of this Chapter
      2. 14.2 Background
      3. 14.3 Exercises
      4. 14.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    5. Chapter 15. Exploring the Fitzhugh-Nagumo Model
      1. 15.1 Goal of this Chapter
      2. 15.2 Background
      3. 15.3 Exercises
      4. 15.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    6. Chapter 16. Convolution
      1. 16.1 Goals of this Chapter
      2. 16.2 Background
      3. 16.3 Exercises
      4. 16.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    7. Chapter 17. Neural Data Analysis I: Encoding
      1. 17.1 Goals of this Chapter
      2. 17.2 Background
      3. 17.3 Exercises
      4. 17.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    8. Chapter 18. Neural Data Analysis II: Binned Spike Data
      1. 18.1 Goals of this Chapter
      2. 18.2 Background
      3. 18.3 Exercises
      4. 18.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    9. Chapter 19. Principal Components Analysis
      1. 19.1 Goals of this Chapter
      2. 19.2 Background
      3. 19.3 Exercises
      4. 19.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    10. Chapter 20. Information Theory
      1. 20.1 Goals of this Chapter
      2. 20.2 Background
      3. 20.3 Exercises
      4. 20.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    11. Chapter 21. Neural Decoding I: Discrete Variables
      1. 21.1 Goals of this Chapter
      2. 21.2 Background
      3. 21.3 Exercises
      4. 21.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    12. Chapter 22. Neural Decoding II: Continuous Variables
      1. 22.1 Goals of This Chapter
      2. 22.2 Background
      3. 22.3 Exercises
      4. 22.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    13. Chapter 23. Local Field Potentials
      1. 23.1 Goals of This Chapter
      2. 23.2 Background
      3. 23.3 Exercises
      4. 23.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in this Chapter
    14. Chapter 24. Functional Magnetic Resonance Imaging
      1. 24.1 Goals of This Chapter
      2. 24.2 Background
      3. 24.3 Exercises
      4. 24.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
  12. Part IV: Data Modeling with MATLAB
    1. Chapter 25. Voltage-Gated Ion Channels
      1. 25.1 Goal of This Chapter
      2. 25.2 Background
      3. 25.3 Exercises
      4. 25.4 Project
      5. Matlab Functions, Commands, and Operators Covered in This Chapter
    2. Chapter 26. Synaptic Transmission
      1. 26.1 Goals of This Chapter
      2. 26.2 Background
      3. 26.3 Exercises
      4. 26.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    3. Chapter 27. Modeling a Single Neuron
      1. 27.1 Goal of This Chapter
      2. 27.2 Background
      3. 27.3 Exercises
      4. 27.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    4. Chapter 28. Models of the Retina
      1. 28.1 Goal of This Chapter
      2. 28.2 Background
      3. 28.3 Exercises
      4. 28.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    5. Chapter 29. Simplified Model of Spiking Neurons
      1. 29.1 Goal of This Chapter
      2. 29.2 Background
      3. 29.3 Exercises
      4. 29.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    6. Chapter 30. Fitzhugh-Nagumo Model: Traveling Waves
      1. 30.1 Goals of This Chapter
      2. 30.2 Background
      3. 30.3 Exercises
      4. 30.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    7. Chapter 31. Decision Theory
      1. 31.1 Goals of this Chapter
      2. 31.2 Background
      3. 31.3 Simple Accumulation of Evidence
      4. 31.4 Free Response Tasks
      5. 31.5 Multiple Iterators: The Race Model
      6. 31.6 Cortical Models
      7. 31.7 Project
      8. MATLAB Functions, Commands, and Operators Covered in this Chapter
    8. Chapter 32. Markov Models
      1. 32.1 Goal of this Chapter
      2. 32.2 Introduction
      3. 32.3 Finding the Most Probable Path: The Viterbi Algorithm
      4. 32.4 Hidden Markov Models
      5. 32.5 Training an HMM: The Baum-Welch Algorithm
      6. 32.6 A Simple Example
      7. 32.7 Project
      8. MATLAB Functions, Commands, and Operators Covered in This Chapter
    9. Chapter 33. Modeling Spike Trains as a Poisson Process
      1. 33.1 Goals of this Chapter
      2. 33.2 Background
      3. 33.3 The Bernoulli Process: Events in Discrete Time
      4. 33.4 The Poisson Process: Events in Continuous Time
      5. 33.5 Picking Random Variables Without the Statistics Toolbox
      6. 33.6 Non-Homogeneous Poisson Processes: Time-Varying Rates of Activity
      7. 33.7 Project
      8. MATLAB Functions, Commands, and Operators Covered in This Chapter
    10. Chapter 34. Exploring the Wilson-Cowan Equations
      1. 34.1 Goal of This Chapter
      2. 34.2 Background
      3. 34.3 The Model
      4. 34.4 Exercises
      5. 34.5 Projects
      6. MATLAB Functions, Commands, and Operators Covered in This Chapter
    11. Chapter 35. Neural Networks as Forest Fires: Stochastic Neurodynamics
      1. 35.1 Goals of This Chapter
      2. 35.2 Background
      3. 35.3 Exercises
      4. 35.4 Projects
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    12. Chapter 36. Neural Networks Part I: Unsupervised Learning
      1. 36.1 Goals of This Chapter
      2. 36.2 Background
      3. 36.3 Exercises
      4. 36.4 Project
      5. MATLAB Functions, Commands, and Operators Covered in This Chapter
    13. Chapter 37. Neural Networks Part II: Supervised Learning
      1. 37.1 Goals of This Chapter
      2. 37.2 Background
      3. 37.3 Exercises
      4. 37.4 Project
      5. MATLAB Functions, Commands, and Operators covered in This Chapter
  13. Appendix A. Creating Publication-Quality Figures
    1. A.1 Introduction
    2. A.2 Figure Makeovers
    3. A.3 Saving Figures in the Desired Format
    4. A.4 How to Make Animated GIFs
    5. MATLAB Functions, Commands, and Operators Covered in This Appendix
  14. Appendix B. Relevant Toolboxes
    1. B.1 The Concept of Toolboxes
    2. B.2 Neural Network Toolbox
    3. B.3 Parallel Computing Toolbox
    4. B.4 Statistics Toolbox
    5. B.5 MATLAB Compiler
    6. B.6 Database Toolbox
    7. B.7 Signal Processing Toolbox
    8. B.8 Data Acquisition Toolbox
    9. B.9 Image Processing Toolbox
    10. B.10 Psychophysics Toolbox and MGL
    11. B.11 Chronux
    12. B.12 Mathworks File Exchange
  15. References
  16. Index