info <- rep(NA,20)
for (j in 1:20) {
info[j] <- pnorm(0.1*j-1,0,1/4.5)-pnorm(0.1*j-1-0.1,0,1/4.5)
}
info <- as.numeric(sprintf("%.5f",info))
initialsol <- as.vector(t(as.matrix(cbind(matrix(0.000001,20,10),as.matrix(info-0.000001*10)))))
In short, initialsol is a vector that sums up to 1 with limit decimal places.
rep(1,220)%*%initialsol
turns out to be 1. However,
rep(1,220)%*%initialsol==1
is FALSE. Why is that?