Does A stay fixed. Or does it vary each time in the loop? I cannot imagine why you are asking this question if A does not stay fixed, so I assume it does.
Do you have multiple vectors b? If so, why are you using a loop, when a simple matrix multiply will suffice?
Is this your own LU decomposition? WHY? Why not use the LU that MATLAB provides? Why are you using an LU at all for this? So is this homework?
For example, were I to want to solve this problem, I might do it like this:
A = rand(5,5); % random A, since I don't have your matrix A b = rand(5,100); % 100 right hand sides
Ap = pinv(A); Ap = Ap(2,:);
x2 = Ap*b;
x2 will be a 1x100 vector. Did it work? No reason to test all 100 elements. The first 3 should suffice.
A\b(:,1:3) ans = -1.34762677238989 -2.32203158132578 -0.388109971448836 3.72915190105665 1.83179475422785 0.820817371759009 -2.49786105988984 0.0977008830984635 0.0936525938380136 -0.27171174946352 0.178317044475116 -0.350094680576877 -3.1181416137406 -1.19921562646932 0.279935332918383 x2(1:3) ans = 3.72915190105665 1.83179475422785 0.82081737175901
As you can see, x2(i) will be the second element of the solution vector, for the i'th column of the array b. And no loop is required.
So, do you really need to do this in a loop? Do you really need to use an LU?