function f=FlashNoIdeal2(w)
global Ren
global A
global B
global C
global Pop
global k
global z
global fvap
T=w(1);
xx1=w(2);
yy1=w(3);
xx=[xx1 1-xx1];
A=[4.42448 3.99063];
B=[1312.253 1152.971];
C=[-32.445 -47.301];
P1vap=10.^(A(1)-B(1)./(T+C(1)))*760/1.01325;
P2vap=10.^(A(2)-B(2)./(T+C(2)))*760/1.01325;
Lambda12=k(4)./k(3).*exp(-k(1)./(Ren.*T));
Lambda21=k(3)./k(4).*exp(-k(2)./(Ren.*T));
gamma(1)=exp(-log(xx(1)+Lambda12.*xx(2))+xx(2).*(Lambda12./(xx(1)+Lambda12.*xx(2))-Lambda21./(Lambda21.*xx(1)+xx(2))));
gamma(2)=exp(-log(xx(2)+Lambda21.*xx(1))-xx(1).*(Lambda12./(xx(1)+Lambda12.*xx(2))-Lambda21./(Lambda21.*xx(1)+xx(2))));
f(1)=xx(1).*gamma(1).*P1vap+xx(2).*gamma(2).*P2vap-Pop;
f(2)=xx(1).*gamma(1).*P1vap-yy1.*Pop;
f(3)=yy1+(1-fvap)./fvap.*xx(1)-z(1)./fvap;
Error using FlashNoIdeal2 (line 11)
Not enough input arguments.