Ep 5: poorly motivated example
gcapes opened this issue · comments
Gerard Capes commented
This is the second example of a loop which is given.
LOOP_DEMO Demo script to explain loops
len = 0
for vowel = 'aeiou'
len = len + 1;
end
disp(['Number of vowels: ', num2str(len)])
It's not very realistic because you'd be better just using the length()
function.
A better example might be to calculate a series like the fibonacci which isn't easy to vectorise
Gerard Capes commented
Note that the debugging gif will need re-doing if this example is changed.
Gerard Capes commented
Fixed in #232