More like this perhaps:
T = 300:0.5:500;
w = 0.224;
Tc = 304.2;
Pc = 73.83;
k = 0.37464+(1.54226*w)-((0.26992)*(w^2));
R = 1; %%% You haven't defined R and P, so I've used arbitrary values
P = 10;
b = 0.07780*((R*Tc)/Pc);
e = 1 - sqrt(2);
s = 1 + sqrt(2);
for i = 1:numel(T)
Tr = T(i)/Tc;
al = (1+k*(1-(Tr^(1/2))))^2;
a = 0.45724*(((R^2)*(Tc^2)*al)/Pc);
Va = (R*(T(i)))/P;
Vc = ((R*(T(i)))/P) + b - (a/P)*((Va-b)/((Va+e*b)*(Va+s*b)));
Ab = abs((Vc-Va)/Vc);
if (Ab<0.0001)
Vc = Va;
end
V(i) = Vc;
Z(i) = ((P*V(i))/(R*T(i)));
end
subplot(2,1,1)
plot(T, V)
xlabel('T'),ylabel('V')
subplot(2,1,2)
plot(T, Z)
xlabel('T'),ylabel('Z')

