MATLAB course

MATLAB Level 3: Functions

Functions is level 3 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

Functions

  • Function files. A function lives in its own file with its own workspace: inputs in, outputs out, nothing shared.
  • Local functions. Local functions share a file with their caller: helpers scoped where they serve.
  • Anonymous functions. An anonymous function captures inline: f = @(x) x.^2: behaviour as a value.

Inputs and Outputs

  • Multiple outputs. Functions return multiple outputs: [m, idx] = max(data): callers taking what they need.
  • arguments blocks. The arguments block validates inputs declaratively: types, sizes and defaults checked at the door.
  • varargout awareness. Variadic varargin and varargout handle flexible signatures: read them fluently, write them rarely.

Reusable Numerical Programs

  • Pure functions first. Reusable code is functions, not scripts: no global state, no workspace assumptions.
  • Function handles. A handle passes a function to another: integrators and solvers taking your equations.
  • Paths and organisation. Code organises on the path: folders and packages, dependencies explicit.

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 3: Functions cover?

Functions, Inputs and Outputs, Reusable Numerical Programs: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 2: Matrices & Arrays, which covers Matrix Operations, Indexing, Vectorised Computation.

Learn MATLAB on your phone

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