Matlab is one of the main tools for the analysis of scientific data. This course introduces scientific computing, data analysis, and statistics in Matlab. Students learn general programming techniques based on specific examples from neuroscience, including the analysis of behavioral data, functional imaging, and electrophysiological recordings.
This repository contains all course materials organized by module. Each module is self-contained with documentation, code examples, data files, and assignments.
Originally taught in the Behavioral and Neural Sciences Program (now Graduate Program in Neuroscience) at the Center for Molecular and Behavioral Neuroscience, Rutgers University - Newark between 2011 and 2023.
Author: Bart Krekelberg
Website: vision.rutgers.edu
Last Updated: January 2025
- MATLAB (any recent version)
- Basic familiarity with programming concepts
- Git installed on your computer
- Fork this repository to your own GitHub account
- Clone your fork to your local machine:
git clone https://github.com/YOUR-USERNAME/Scientific-Computing-in-Matlab.git
- Work through the modules in order (start with Module 0)
- Complete assignments and commit your work to your fork
- Push your changes to track your progress
- Git Client: GitKraken (any OS), GitExtensions (Windows), or GitHub Desktop (Windows/macOS)
- MATLAB: Install from your institution or purchase a license
Before the first week - Essential Matlab skills
- The Matlab Environment
- Elementary Matlab operations
- Program Flow and Control Structures
- Functions and Scripts
Week 1 - Project organization and Git fundamentals
- Folder and file organization
- Git and GitHub basics
- Version control workflows
Week 2 - Writing clean, maintainable code
- Code structure and documentation
- Programming style guidelines
- Input parsing and validation
Week 3 - Data structures in Matlab
- Arrays and matrices
- Structures and tables
- Data organization best practices
Week 4 - Creating professional visualizations
- Plot customization
- Color theory and design
- Exporting figures
Week 5 - Working with external data
- File I/O operations
- Data format handling
- Import/export strategies
Week 6 - Statistical testing
- T-tests and ANOVA
- Assumptions and validation
- Parametric test selection
Week 7 - Frequency domain analysis
- Fourier transforms
- Signal processing
- Filtering techniques
Week 8 - Model fitting to data
- Linear and nonlinear regression
- Optimization methods
- Error analysis
Week 9 - Machine learning basics
- Principal Component Analysis (PCA)
- Support Vector Machines (SVM)
- Classification performance metrics
Week 10 - Distribution-free testing
- Permutation tests
- Bootstrap methods
- Resampling strategies
Week 11 - Model validation and generalization
- Cross-validation
- Regularization techniques
- Preventing overfitting
Introduction to Git, GitHub, and version control for those new to these tools.
Each module typically contains:
- README.md - Module overview, objectives, and instructions
- /docs/ - Tutorial materials, PDFs, and documentation
- /code/ - Starter code and example scripts
- /data/ - Sample datasets for assignments
- Start with Module 0 if you're new to Matlab or need a refresher
- Complete the GitHub Starter Course if you're unfamiliar with Git/GitHub
- Work through modules sequentially - each builds on previous concepts
- Complete assignments in each module before moving to the next
- Refer back to earlier modules as needed when working on advanced topics
- MATLAB Documentation
- MATLAB Onramp - Free interactive tutorial
- Coursera: Introduction to Programming with MATLAB
If you're using this repository for self-study and have questions:
- Review the module documentation thoroughly
- Check MATLAB's built-in help:
help function_nameordoc function_name - Search the MATLAB Answers community
- Refer to the additional resources listed above
These materials are provided for educational purposes. Please credit the author when using or adapting these materials.
Thanks to all students who participated in this course between 2011-2023 and provided feedback to improve these materials.