Código 6
Código 6
Código 6
for j=1:NC
Yjaj(j)=Yi(j)*ai(j)^0.5
end
for i=1:NC
fic(i)=exp(log(v/(v-b))+bi(i)/(v-b)+
((2*sum(Yjaj)*ai(i)^0.5)/(R*b*T^1.5)-(a*bi(i))/(R*b^2*T^1.5))*log(v/
(v+b))-(a*bi(i))/(R*T^1.5*b*(v+b))-log((P*v)/(R*T)))
end
for i=1:NC
errorfi(i)=abs((fi(i)-fic(i))/(fic(i)))
end
errorf=sum(errorfi)
fi=fic