temprhs=diag(muiZmX);
templhs=diag(diag(V*dd))+diag(dz0*iZX)+diag(iZusMatX);
norm(temprhs-templhs)
%%%%%%%%%%%%%%%%
V=[-ones(1,n-1);eye(n-1)];
lhsC=(diag(V*dd))+usMatEc(dx,n,mc,indsEc)+(dz0*iZX)+(iZusMatX);
rhsC=(muiZmX);
norm(lhsC-rhsC)
