
times = zeros(1,100);

for iter = 1:100 %perform 100 iterations
    clear a;
    a = rand(1e7,1);       % generate a large random vector to avoid caching, etc.
    tic;                 % start the clock;
    b = a'*a;              % perform the dot product
    times(iter) = toc;        % stop the clock
end

mflops = 10./times;        % MFLOPS for each multiplication 
means = mean(mflops);    % mean MFLOPS


