Efficient Matlab Programming

From NA-Wiki

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
Here are some notes on how to write good and efficient Matlab code. It covers:
+
Here are some notes on how to write good and [[http://na37.nada.kth.se/pub/matlab_perf.pdf efficient Matlab code]]. It covers:
* Pre-allocation of memory
* Pre-allocation of memory
* Inline and anonymous functions
* Inline and anonymous functions

Revision as of 08:35, 21 January 2008

Here are some notes on how to write good and [efficient Matlab code]. It covers:

  • Pre-allocation of memory
  • Inline and anonymous functions
  • Vectorization via element sub-scripting
  • Vectorization via logical index masking
  • The benefit of JIT
  • Direct and "indirect" indexing
  • Copy-on-write
  • Construction of sparse matrices
Personal tools