function [wnew,knew]=fixk(w,sumK); % global L r alpha N; K=compK(w); wnew=(sumK/sum(K))*w; knew=compK(wnew); return