function h = htx(P,m,n,t,X) h = 0; for j=t+1:n h = h + etaijX(P,m,n,t,j,X); end h = h+1; return