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