Dealing with variables created in MatLab
Posted: Thu Sep 04, 2008 2:45 pm
Hi,
Once I execute the dynare('MyModel') command, it appears that Dynare clears all variables I have created in MatLab before. Is there a possibility to use variables created in previous MatLab functions within the .mod file?
I'm thinking about something like:
simulationperiods = 20;
forecasthorizon = 1;
dynare('MyModel', simulationperiods, forecasthorizon);
...
It turns out that the variable simulationperiods or forecasthorizon are cleared after having run dynare. Moreover, I can take the variables as input for dynare but they will be cleared in turn and cannot be used for model calculations. Is there a possibility to deal with variables created in MatLab? THX in advance!
Once I execute the dynare('MyModel') command, it appears that Dynare clears all variables I have created in MatLab before. Is there a possibility to use variables created in previous MatLab functions within the .mod file?
I'm thinking about something like:
simulationperiods = 20;
forecasthorizon = 1;
dynare('MyModel', simulationperiods, forecasthorizon);
...
It turns out that the variable simulationperiods or forecasthorizon are cleared after having run dynare. Moreover, I can take the variables as input for dynare but they will be cleared in turn and cannot be used for model calculations. Is there a possibility to deal with variables created in MatLab? THX in advance!