results = linspace(0, 0, 1000); i = 1; while i <= 1000 results(i) = apples(20); i = i + 1; end mean(results)