function [ys,check] = prova_steadystate(ys,exe)
global M_ lgy_
global rho beta b eta a sigma chi n q v c y w u E U s h etaz omegab omegaf omegah Gzr gzr z zr wprimezr J EW EF S F rhoa rhoh rhoeta rhob rhof sigmaa sigmah sigmaeta sigmab sigmaf;



if isfield(M_,'param_nbr') == 1
NumberOfParameters = M_.param_nbr;
for i = 1:NumberOfParameters
  paramname = deblank(M_.param_names(i,:));
  eval([ paramname ' = M_.params(' int2str(i) ');']);
end
check = 0;
end



zr = logninv(Gzr,0,0.2);

gzr = lognpdf(zr,0,0.2);

z0 = (log(zr)-0)/0.2; 

z = exp(0+0.2/2)*(0.5+0.5*erf((sqrt(0.2)-z0)/sqrt(2)))/(0.5+0.5*erf(-z0/sqrt(2)));  % check that sd is not variance

wprimezr = 1;

y = n;

rho = 1-0.0159;

u = 1-rho*n;



v = s/q*u;

sigmam = s/(s/q)^sigma;

m = sigmam*u^sigma*v^(1-sigma);

eta = sigma;





options = optimset('Display','off','TolFun',1e-10);
x0 = [1; 0.9*0.5; 0.2; 0.8; 0.02; 0.2; 0.2];  %.................................................................. TO FILL
xd = fsolve(@Fprova, x0, options, beta, rho, s, eta, q, omegab, omegaf, omegah);

E = xd(1); 

w = xd(2);

U = xd(3);  

b = xd(4);

chi = xd(5);

h = xd(7);

F = xd(6);


S = E-U;

J=(1-eta)/eta*S-F;

EW = (1-Gzr)*(E-U)+Gzr*U;

EF = (1-Gzr)*J+Gzr*F;

c = y-chi*v-h*v*q-F*Gzr*n/(1-Gzr);




yt =0;
nt =0;
Gammat =0;
ct =0;
qt =0;
vt =0;
wt =0;
mt =0;
ut =0;
st =0;
Et =0;
Ut =0;
e_at =0;
e_ht =0;
e_etat =0;
e_bt=0;
zt =0;
zrt =0;
e_ft =0;
Jt =0;
St =0;
EWt =0;
EFt=0;


for iter = 1:length(M_.params)
  eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names(iter,:) ';' ])
end

if isfield(M_,'param_nbr') == 1

if isfield(M_,'orig_endo_nbr') == 1
NumberOfEndogenousVariables = M_.orig_endo_nbr;
else
NumberOfEndogenousVariables = M_.endo_nbr;
end
ys = zeros(NumberOfEndogenousVariables,1);
for i = 1:NumberOfEndogenousVariables
  varname = deblank(M_.endo_names(i,:));
  eval(['ys(' int2str(i) ') = ' varname ';']);
end
else
ys=zeros(length(lgy_),1);
for i = 1:length(lgy_)
    ys(i) = eval(lgy_(i,:));
end
check = 0;
end
end











