N = 100;  # number of trials (> 50 for Central Limit Theorem to apply)

bm = zeros (N, 1);   # pre-declare benchmark data array

## Run one inner loop to engage CPU frequency scaling
for i = 1:1e5
  x = i * 2;
  x = x .^ 2;
  x = x - 3 * x;
endfor

## Run benchmark
for j = 1:N
  tic ();
  for i = 1:1e5
    x = i * 2;
    x = x .^ 2;
    x = x - 3 * x;
  endfor
  bm(j) = toc ();
endfor

disp (mean (bm));
disp (std (bm));
