MATLAB course

MATLAB Level 10: Performance

Performance is level 10 of 12 of the LoWisa MATLAB course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-30

Vectorisation

  • Vectorise the loop. The first optimisation is vectorisation: the loop restated as array operations.
  • Preallocation. Growing arrays inside loops copies every pass: preallocate with zeros and fill.
  • Built-ins win. Built-in functions run compiled C underneath: your loop competes and loses.

Profiling

  • The profiler. The profiler attributes time per line: measured hotspots over folklore.
  • timeit. timeit benchmarks functions honestly: warmed, repeated, median reported.
  • Memory in the profiler. The profiler tracks memory too: copies and growth caught beside time.

Memory-Efficient MATLAB

  • Copy-on-write. MATLAB copies arrays lazily: mutation inside functions triggers the real copy.
  • In-place patterns. Same-variable operations enable in-place updates: x = x + 1 without a second array.
  • Right-sized types. single and integer types halve memory where precision allows: chosen, documented.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does MATLAB Level 10: Performance cover?

Vectorisation, Profiling, Memory-Efficient MATLAB: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 9: Object-Oriented MATLAB, which covers Classes, Properties and Methods, Reusable Engineering Components.

Learn MATLAB on your phone

The first level is free. LoWisa is on Google Play and the App Store.