Closes #1057.
Use a static file with a list of routines to cleared before each run (because they have persistent variables).This static file (the script matlab/list_of_functions_to_be_cleared.m) is distributed with Dynare and needs to be updated for each release (or each time we add/remove persistent variables). To update the file just do: >> clear_persistent_variables(DYNARE_MATLAB_PATH, true) and add/commit the generated file.issue#70
parent
035b6ea463
commit
0038bbe755
|
@ -579,7 +579,7 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
|
|||
<< " clear all" << endl
|
||||
<< "else" << endl
|
||||
<< " clearvars -global" << endl
|
||||
<< " clear_persistent_variables(fileparts(which('dynare')))" << endl
|
||||
<< " clear_persistent_variables(fileparts(which('dynare')), false)" << endl
|
||||
<< "end" << endl;
|
||||
else if (clear_global)
|
||||
mOutputFile << "clear M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info estimation_info ys0_ ex0_;" << endl;
|
||||
|
|
Loading…
Reference in New Issue