Page 1 of 1

too many output arguments

PostPosted: Thu Mar 19, 2015 1:51 pm
by marcio_fr
Hi,
I'm trying to write a SS file based on examples provided by dynare folder. But the following error message appears:

??? Error using ==> tese_steadystate_helper
Too many output arguments.

Error in ==> simul_teseMarcio_steadystate2 at 4
[ys_(1),ys_(2),ys_(3),ys_(4),ys_(5),ys_(6),ys_(7),ys_(8),ys_(9),ys_(10),ys_(11),ys_(12),ys_(15),ys_(16),ys_(17),ys_(44),ys_(45),ys_(28),ys_(29),ys_(24),ys_(25),ys_(26),ys_(36)]=tese_steadystate_h
Error in ==> evaluate_steady_state_file at 54
[ys,params1,check] = h_steadystate(ys_init, exo_ss,
params);

Error in ==> evaluate_steady_state at 58
[ys,params,info] =
evaluate_steady_state_file(ys_init,exo_ss,M, ...

Error in ==> resol at 104
[dr.ys,M.params,info] =
evaluate_steady_state(oo.steady_state,M,options,oo,0);

Error in ==> check at 73
[dr,info,M,options,oo] = resol(1,M,options,oo);

Error in ==> simul_teseMarcio at 732
oo_.dr.eigval = check(M_,options_,oo_);

Error in ==> dynare at 180
evalin('base',fname) ;

How can I fix this problem?

Best, Márcio.

Re: too many output arguments

PostPosted: Thu Mar 19, 2015 2:41 pm
by jpfeifer
Your steady_state_helper has one output argument defined. But you try to assign this one value to
Code: Select all
ys_(1),ys_(2)

etc.

Re: too many output arguments

PostPosted: Wed Mar 25, 2015 2:24 am
by marcio_fr
But, how can I assign each variable to a value calculated by fsolver function?

Re: too many output arguments

PostPosted: Wed Mar 25, 2015 7:28 am
by jpfeifer
Call the function with the syntax you programmed:
Code: Select all
 F = tese_steadystate_helper

Then do the assignments like e.g.
Code: Select all
ys_(1)=F(1);