The programming construct you are likely to use the most is the for loop, which repeats
a section of code a number of times, stepping through a set of values. In Octave you
should try to use vector arithmetic rather than a for loop, if possible, since a for loop is
about 40 times slower.21 However, there are times when a for loop is unavoidable.