All Images

Working With Variables


Arrays


Figure 1

Accessing a single value

Figure 2

Accessing a single value

Figure 3

Accessing multiple rows

Figure 4

Accessing multiple columns

Figure 5

Accessing a submatrix

Figure 6

Accessing strided columns

Figure 7

Accessing strided rows and columns

Plotting data


Figure 1

Operations Across Axes

Figure 2

Heat map

Figure 3

Average inflammation

Figure 4

Maximum inflammation

Figure 5

Minumum inflammation

Figure 6

Max Min subplot

Writing MATLAB Scripts


Repeating With Loops


Figure 1

This process is illustrated below: debugger-demo


Figure 2

Three line plots of inflammation against day for the first data file: the average rises to about 13 at day 20 and falls again, the maximum forms a straight ramp from 0 up to 20 and back to 0, and the minimum rises and falls in a staircase pattern.

Figure 3

Three line plots of inflammation against day for the second data file, showing the same pattern as the first: a noisy rise and fall in the average, a linear ramp up to 20 and down in the maximum, and a staircase in the minimum.

Figure 4

Three line plots of inflammation against day for the third data file, again with a noisy rise and fall in the average, a linear ramp up to 20 and down in the maximum, and a staircase in the minimum.

Making Choices


Creating Functions


Figure 1

function-definition

Defensive Programming


Figure 1

Overlapping Ranges