function [ys,check] = NKM_steadystate(ys,exe)

% % -------------------------------------- % %
% % ------ Extracci?n de par?metros ------ % %
% % -------------------------------------- % %

global M_

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

% % --------------------------------------------- % %
% % ------ C?lculo del estado estacionario ------ % %
% % --------------------------------------------- % %
%%

n_t = 1;
r_t = 1/betta + delta - 1;
pi_t = pi_bar;
i_bar = (1+pi_t)/betta - 1;
i_t = i_bar;
pih_t = (((1+pi_t)^(1-ep)-phi)/(1-phi))^(1/(1-ep)) - 1;
nu_t = (1-phi)*(1+pi_t)^(ep)*(1+pih_t)^(-ep)/(1-phi*(1+pi_t)^(ep));
mc_t = ((1-betta*phi*(1+pi_t)^(ep))/(1-betta*phi*(1+pi_t)^(ep-1)))*((1+pih_t)/(1+pi_t))*((ep-1)/ep);
alpha_k*mc_t*n_t^(1-alpha_k);
alpha_k;
k_t = (alpha_k*mc_t*n_t^(1-alpha_k)/(nu_t*r_t))^(1/(1-alpha_k));
x_t = delta*k_t;
A_t = 1;
y_t = (A_t/nu_t)*(k_t^alpha_k)*(n_t^(1-alpha_k));
c_t = y_t - x_t;
lambda_t = c_t^(-sig);
mu_t = lambda_t;
w_t = (1-alpha_k)*mc_t*y_t/n_t;
varphi = lambda_t*w_t/n_t^(eta);
m_t = theta/lambda_t*((1+pi_t)/(1+pi_t-betta));
aux1_t = c_t^(-sig)*y_t*mc_t/(1-betta*phi*(1+pi_t)^(ep));
aux2_t = c_t^(-sig)*y_t/(1-betta*phi*(1+pi_t)^(ep-1));
z_t = 1;
ups_t = 1;
psi_t = 1;


%% end own model equations
for iter = 1:length(M_.params) %update parameters set in the file
  eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names(iter,:) ';' ])
end

NumberOfEndogenousVariables = M_.orig_endo_nbr; %auxiliary variables are set automatically
for ii = 1:NumberOfEndogenousVariables
  varname = deblank(M_.endo_names(ii,:));
  eval(['ys(' int2str(ii) ') = ' varname ';']);
end
end
