Assuming that the equations written by you are correct, and ( (parenthesis) placed by you are fine too, the vpasolve function returns an empty sym: 0-by-1. You can check it by executing:
This means that vpasolve cannot find a solution and would then return an empty object.
So, each time you run the iteration over i, vpasolve would return a 0 x 1 array; and answer array would finally get the size 5-by-0. This is also the reason you get the error 'Unable to perform assignment because the left and right sides have a different number of elements'.
To get rid of the error, you might have to check the correctness of the equations written by you, or you can provide an initial guess to help the solver find a solution - link.