load supreme_agree.dat
inperm = [1 2 3 4 5 6 7 8 9];
proxpermut = supreme_agree(inperm,inperm);
[fit,diff,coord] = linfit(proxpermut,1:9)
[monprox,vaf,diff] = proxmon(proxpermut,fit)
sumfitsq = sum(sum(fit.^2));

for i = 1:100
    
    [fit,diff,coord] = linfit(monprox,1:9);
    
    sumnewfitsq = sum(sum(fit.^2));
    
    fit = sqrt(sumfitsq)*(fit/sumnewfitsq);
    
    [monprox,vaf,diff] = proxmon(proxpermut,fit);
    
end

fit
coord
vaf
diff
monprox
supreme_agree


    