clear all profile on global A D counter n=100000;density=.0001; A=sprandsym(n,density); D=speye(n); a=randn(n,1); s=.1; dgaptol=1e-12; [xopt,fopt,lopt,lambdamin,flag] = newtrust4b(a,s,dgaptol); profile report