I have a toy example that I really need some help to understand;
w <- c(6, 4, 6) wC <- matrix(c(0,0,0, 0, 0.18246054, 0.05455325,