function [ys, params, check]=rbc_trend_steadystate(ys, exo, M_, options_)

global  betac sigmac chik sigman deltac alphac rho_ab

number_of_parameters = M_.param_nbr;

for ii=1:number_of_parameters
    paramname=M_.param_names{ii};
    eval([ paramname ' = M_.params(' int2str(ii) ');']);
end
check = 0;

%%
options=optimset('MaxFunEvals',10000,'TolX',1e-10,'TolFun',1e-10);
ab=exo(strmatch('ab',M_.exo_names,'exact'));
rk=(1/betac)+deltac-1;

k_g=12;
n_g=0.3;
guess=[k_g, n_g];
ss_sol = fsolve(@findssrbc_trend, guess, options);
k=ss_sol(1);
n=ss_sol(2);
i=deltac*k;
y=(k^alphac)*((n*ab)^(1-alphac));
w=(1-alphac)*(y/n);
c=y-i;
lambdac=c^(-sigmac);



%%
params=NaN(number_of_parameters,1);
for  iter = 1:length(M_.params) %update parameters set in the file
     eval([ 'params(' num2str(iter) ') = ' M_.param_names{iter} ';' ])
end

number_of_endogenous_variables = M_.orig_endo_nbr;
for ii = 1:number_of_endogenous_variables
    varname = M_.endo_names{ii};
    eval(['ys(' int2str(ii) ') = ' varname ';']);
end