# MATLAB Level 1: MATLAB Foundations

> Level 1: MATLAB Foundations of the LoWisa MATLAB course: Variables and Types, Scripts, Control Flow. 3 lessons and 9 ideas, each explained in one line.

MATLAB Foundations is level 1 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.

## Variables and Types

- **Doubles by default.** Numbers are **double** by default: integer and single types chosen explicitly when memory demands.
- **Strings and chars.** Modern text uses **string** arrays: double-quoted, element-wise, distinct from char rows.
- **Logical values.** Comparisons produce **logical** arrays: the masks vectorised selection is built on.

## Scripts

- **Scripts.** A **script** runs commands top to bottom: sharing the base workspace, the exploration format.
- **Sections.** Double-percent **sections** split scripts into runnable cells: iterate one block at a time.
- **clear discipline.** Reproducible scripts start clean: **clear** assumptions, not inherited workspace debris.

## Control Flow

- **if and switch.** if/elseif/else and **switch** branch execution: end closing every block.
- **Loops.** **for** and while loop: while vectorisation usually replaces them, reading them stays essential.
- **Vectorise first.** The MATLAB reflex: replace the loop with an **array** operation: clearer and dramatically faster.

## Before and after this level

- **Before:** [Start Here: Matrix-Oriented Programming](/courses/matlab/start-here/): MATLAB Environment, Numerical Computing Model.
- **Next:** [Level 2: Matrices & Arrays](/courses/matlab/level-2-matrices-and-arrays/): Matrix Operations, Indexing, Vectorised Computation.

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 1: MATLAB Foundations cover?

Variables and Types, Scripts, Control Flow: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Start Here: Matrix-Oriented Programming, which covers MATLAB Environment, Numerical Computing Model.

## 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-1-matlab-foundations/ · Updated 2026-11-30
