I have a 3by2 and a 3by1 complex matrix and I want to use the "solve" function to get a 2by1 complex matrix. I am getting error. Does anyone know how can I solve two non-square complex matrices?
a <- matrix(c(a1h[i],a2h[i],a1v[i],a2v[i],a1y[i],a2y[i]), nrow=3, byrow=T)
b <- matrix(c(bx[i],by[i],bz[i]),nrow=3)
solve(a,b)
Error in solve.default(a, b) : 'a' (3 x 2) must be square.