image thumbnail

Writing Fast MATLAB Code

version (328 KB) by Pascal Getreuer
Speed up your project with this collection of techniques.


Updated 10 Feb 2009

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week Popular File 2008

Learn how to use the Profiler tool, vectorized functions, and other tricks to writing efficient MATLAB code. This article includes how to convert any array into a column vector, bounding a value without if statements, and repeating/tiling a vector without repmat.

* Introduction
* The Profiler
* Array Preallocation
* JIT Acceleration
* Vectorization
* Inlining Simple Functions
* Referencing Operations
* Solving Ax=b
* Numerical Integration
* Signal Processing
* Miscellaneous Tricks
* Further Reading

Cite As

Pascal Getreuer (2021). Writing Fast MATLAB Code (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!