This section will show an example of how to create figures, plotted directly in the code.
Let’s start by writing some code to produce a random walk simulation:
x = 1:100
y = cumsum(rand((-1, 1), length(x)))
Below in Figure 1, you can see a plot of this random walk: