% Steady state file for a simple, log-linearized RBC model
% November 2014

function[ys,check]=rbc_steadystate(ys,exe)
global M_

% Here, the values of the deep parameters are loaded in a loop.
%
NumberOfParameters = M_.param_nbr;                            % Number of deep parameters.
for i = 1:NumberOfParameters                                  % Loop...
  paramname = deblank(M_.param_names(i,:));                   %    Get the name of parameter i. 
  eval([ paramname ' = M_.params(' int2str(i) ');']);         %    Get the value of parameter i.
end                                                           % End of the loop.  
check = 0;


% Enter the steady state model equations here
%ns=0.3;
%betta=0.99;
%delta=0.025;
%a=0.64;
r=1/betta-1+delta;
kn_s=((1-a)/r)^(1/a);
k_s=kn_s*n_s;
ck_s=kn_s^(-a)-delta;
c_s=ck_s*k_s;
y_s=n_s^a*k_s^(1-a);




% End of the steady state model block


for iter = 1:length(M_.params) %update parameters set in the file
  eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names(iter,:) ';' ])
end




% The steady state valuues of the endogenous variables of the model are
% defined here.

NumberOfEndogenousVariables = M_.endo_nbr;                    % Number of endogenous variables.
ys = zeros(NumberOfEndogenousVariables,1);                    % Initialization of ys (steady state).
for i = 1:NumberOfEndogenousVariables                         % Loop...
  %varname = deblank(M_.endo_names(i,:));                      %    Get the name of endogenous variable i.                     
  %eval(['ys(' int2str(i) ') = ' varname ';']);
  ys(i)=0;%    Get the steady state vZNue of this variable.
end          