function F = steadystate(x,ssigma,ppsi,oomegac,tthetac,ggamma,pphi,oomegaell,tthetaell,bbeta,xxib,eeta,AH,aalphah,xxi,rrho,Bbar,AN,aalphan)

%   1 2  3  4 5  6  7  8  9  10  11  12 
%x=[C CT CN L LH LN Bs WP PE PPN WWH WWN];

F(1) = eeta*x(7)+log(rrho*bbeta*oomegac^(1/tthetac)/xxib)+(-ssigma+1/tthetac)*x(1)-1/tthetac*x(2);
F(2) = ssigma*x(1) + ppsi*x(4) - x(8);
F(3) = x(2) - log(oomegac) - tthetac*x(9) - x(1);
F(4) = x(3) - log(1-oomegac) - tthetac*x(10) - x(1);
F(5) = x(5) - log(oomegaell) - tthetaell*x(11) - x(4);
F(6) = x(6) - log(1-oomegaell) - tthetaell*x(12) - x(4);
F(7) = x(3) - log(AN) - aalphan*x(6);
F(8) = x(9)+x(8)-x(11) - log(AH*aalphah) - (aalphah-1)*x(5);
F(9) = x(10)+x(8)-x(12)-log(AN*aalphan)-(aalphan-1)*x(6);
F(10) = exp(x(1))^((tthetac-1)/tthetac)-oomegac^(1/tthetac)*exp(x(2))^((tthetac-1)/tthetac)-(1-oomegac)^(1/tthetac)*exp(x(3))^((tthetac-1)/tthetac);
F(11) = exp(x(4))^((tthetaell-1)/tthetaell) - oomegaell^(1/tthetaell)*exp(x(5))^((tthetaell-1)/tthetaell) - (1-oomegaell)^(1/tthetaell)*exp(x(6))^((tthetaell-1)/tthetaell);
F(12) = AH*exp(x(5))^aalphah - exp(x(2)) + (1/bbeta-1-rrho)*exp(x(7)) + (1-bbeta)/bbeta*Bbar;