I am implementing a code for GP which is an iterative algorithm and I have a few concerns. I was hoping someone can help me figure out the logic:
1) I need to be able to start with an initial starting point b that satisfies the condition of the constraints as Ab = c
Here is the matrix A and vector c
A <- rbind(c(1,1,1),c(-1,1,-1))
c <- c(0,5)
I tried the following 2 approaches to find b0 as an initial point to start the iteration
b0 <- solve(t(A)%*%A)%*%t(A)%*%c
b0 <- ginv(A)%*%c
but when I check the code below, I don't get all the b0 components right.
A %*% b0 == c
Can you help me figure out a better way to obtain the initial point that satisfies the condition Ab=c?
Thanks