function [outperms,rawindices,indices,coords,diffs] = ...
    uniscalqa_montecarlo(prox,kblock,nstart)

rand('state',sum(100*clock));
n = size(prox,1);
targ = targlin(n);

for i = 1:nstart
    inperm = randperm(n);
    [outperm,rawindex,allperms,index,coord,diff] = ...
        uniscalqa(prox,targ,inperm,kblock);
    outperms{i} = outperm;
    rawindices(i) = rawindex;
    indices(i) = index;
    coords{i} = coord;
    diffs(i) = diff;
end
  
