function [S,SS] = npsi(K,m,n) S = 0; for t=1:n SS(t) = sum(K.*(K<0)); S = S + SS(t); K = getK1(K,m,n-t+1); end %S = S+pl(K); return