n = 10000;
m = 2000;
nbr_iters = [];
exec_times = [];
iter = 0;
for jj = 1:50
g = acquire_data(m);
tic;
[sol,iter] = qp_mex(g);
tt = toc;
nbr_iters = [nbr_iters iter];
exec_times = [exec_times tt];
end
fprintf('Average number of iterations: %g\n',mean(nbr_iters));
fprintf('Max number of iterations: %d\n',max(nbr_iters));
fprintf('Average execution time (ms): %g\n',1e3*mean(exec_times));
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