too many output arguments

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

too many output arguments

Postby marcio_fr » Thu Mar 19, 2015 1:51 pm

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.
Attachments
tese_steadystate_helper.m
(5 KiB) Downloaded 82 times
simul_teseMarcio.mod
(20.47 KiB) Downloaded 63 times
marcio_fr
 
Posts: 22
Joined: Fri Nov 27, 2009 7:14 pm

Re: too many output arguments

Postby jpfeifer » Thu Mar 19, 2015 2:41 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: too many output arguments

Postby marcio_fr » Wed Mar 25, 2015 2:24 am

But, how can I assign each variable to a value calculated by fsolver function?
marcio_fr
 
Posts: 22
Joined: Fri Nov 27, 2009 7:14 pm

Re: too many output arguments

Postby jpfeifer » Wed Mar 25, 2015 7:28 am

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);
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests