

function [ys,check] = gdyn_steadystate(ys,exe)
global M_

%% DO NOT CHANGE THIS PART.
%%
%% Here we load the values of the deep parameters 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;
%%
%% END OF THE FIRST MODEL INDEPENDENT BLOCK.


%% THIS BLOCK IS MODEL SPECIFIC.
%%
%% Here the user has to define the steady state.
%%


Y=log(exp(K)^alfa*exp(L)^(1-alfa)); 
YI=Y;
Yflex=Y;
i=strmatch('Yflex',M_.param_names,'exact');
M_.params(i)=Yflex;
I=log(delta_U*exp(K));
I_ss=exp(I);
i=strmatch('I_ss',M_.param_names,'exact');
M_.params(i)=I_ss;
G=log(g_ss*exp(Y));
G_ss=exp(G);
i=strmatch('G_ss',M_.param_names,'exact');
M_.params(i)=G_ss
Pm=log((epsilon-1)/epsilon);
Rk=log(exp(Pm)*alfa*exp(Y)/exp(K)+1-delta_U);
Rk_ss=exp(Rk);
i=strmatch('Rk_ss',M_.param_names,'exact');
M_.params(i)=Rk_ss;


%%
%% END OF THE MODEL SPECIFIC BLOCK.


%% DO NOT CHANGE THIS PART.
%%
%% Here we define the steady state values of the endogenous variables of
%% the model.
%%
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 ';']);                %    Get the steady state value of this variable.
end                                                           % End of the loop.
%%
%% END OF THE SECOND MODEL INDEPENDENT BLOCK.