# MATLAB Level 3: Functions

> Level 3: Functions of the LoWisa MATLAB course: Functions, Inputs and Outputs, Reusable Numerical Programs. 3 lessons and 9 ideas, each explained in one line.

Functions is level 3 of 12 of the [LoWisa MATLAB course](/courses/matlab/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## 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

- **Before:** [Level 2: Matrices & Arrays](/courses/matlab/level-2-matrices-and-arrays/): Matrix Operations, Indexing, Vectorised Computation.
- **Next:** [Level 4: Data](/courses/matlab/level-4-data/): Tables, Import and Export, Cleaning Experimental Data.

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](/help/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.

---

Source: https://lowisa.dev/courses/matlab/level-3-functions/ · Updated 2026-11-30
