A for loop is used to construct a simple matrix with an underlying pattern. Pre-allocation is addressed in the second half of the video.
blogs.mathworks.com