Solve sequence of lasso problems

% store problem dimension
n = 10000;
m = 2000;

% store nbr of iterations and execution times
nbr_iters = [];
exec_times = [];

iter = 0;
% run 50 different lasso problems
for jj = 1:50
    % aquire new data (returns random vector)
    g = acquire_data(m);

    % solve problem
    tic;
    [sol,iter] = qp_mex(g);
    tt = toc;

    % store nbr of iterations and execution times
    nbr_iters = [nbr_iters iter];
    exec_times = [exec_times tt];
end

% average number of iterations
fprintf('Average number of iterations: %g\n',mean(nbr_iters));
% max number of iterations
fprintf('Max number of iterations: %d\n',max(nbr_iters));
% average number of iterations
fprintf('Average execution time (ms): %g\n',1e3*mean(exec_times));
% max number of iterations
fprintf('Max execution time (ms): %g\n',1e3*max(exec_times));
Average number of iterations: 38
Max number of iterations: 50
Average execution time (ms): 16.1309
Max execution time (ms): 24.063