
function F = lognorm(x,betas, betab, sigma, mu, pi)
F(1) = betas*mu*x(3) - (betas-betab)*x(4);
%betas*mu*Gprime = (betas-betab)*Omegaprime;
F(2) = x(7) - (log(x(5))+(1/2)*(sigma^2))/sigma;
%zbar = (log(omegabar)+(1/2)*(sigma^2))/sigma;
F(3) = x(6) - (1/((sqrt(2*pi))*x(5)*sigma))*(exp(-0.5*(x(7)^2)));
%fwbar = (1/((sqrt(2*pi))*omegabar*sigma))*(exp(-0.5*(zbar^2)));
F(4) = x(2) - normcdf(x(7)-sigma) - x(5)*(1-normcdf(x(7)));
%Omega = normcdf(zbar-sigma) + omegabar*(1-normcdf(zbar));
F(5) = x(1) - normcdf(x(7)-sigma);
%G = normcdf(zbar-sigma);
F(6) = x(4) - (1 - normcdf(x(7))); 
%Omegaprime = 1-normcdf(zbar);
F(7) = x(3) - x(5)*x(6); 
%Gprime = omegabar*fwbar;
end


