For clarification, EV1, EV0, P0 and P1 are matrixes, while u_0 and u_1 are vectors. EV1 and EV0 are 2x175, P0 and P1 are 175x175 and u_0 and u_1 are 175x1.
I figured out the issue myself. The issue was that EV1 and EV0 are matrixes. Hence,
abs(EV1 - EV0)
is also a matrix and does it makes no sense to compare it to a single number epsilon.
I fixed my code by setting:
V = max(max(abs(EV1 - EV0))); %The maximum difference between any two elements of EV1 and EV0
while V > epsilon
EV0 = EV1;
EV0_0 = EV0(:,1); %Column where i =0.
EV0_1 = EV0(:,2); %Column where i=1.
V = log(exp(u_0 + beta*EV0_0) + exp(u_1 + beta*EV0_1));
EV1_0 = P0*V;
EV1_1 = P1*V;
EV1 = [EV1_0 EV1_1];
V = max(max(abs(EV1 - EV0)));