define periods using symbol
Posted: Fri Apr 19, 2013 6:18 pm
this is a stupid question that may have a quick answer. in deterministic simulations, when defining the sequence of shocks, for example you can define a sequence of exogenous parameter changes, path = [1;2;3], and write
periods 1:3;
values (A);
that works fine. what if i want to define the number of periods as a symbol, say span=3, and let periods go from 1 to the span value, while changing span as you will. i tried 1:(span) and 1:('span'), neither seems to work, dynare says it must be an integer. how should i write it? thanks a lot.
periods 1:3;
values (A);
that works fine. what if i want to define the number of periods as a symbol, say span=3, and let periods go from 1 to the span value, while changing span as you will. i tried 1:(span) and 1:('span'), neither seems to work, dynare says it must be an integer. how should i write it? thanks a lot.