% Matlab code to sum the first N numbers N = 100000; s = 0; for i=1:N, s = s + i; end s