Differences between revisions 1 and 2
Revision 1 as of 2010-04-03 08:32:54
Size: 969
Comment:
Revision 2 as of 2010-04-19 14:56:24
Size: 942
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
Functions called by Dynare code that still need to be corrected
 * mr_gstep.m (M. Ratto)
 * mr_hessian.m (M. Ratto)

Line 19: Line 14:

See trac ticket [[https://www.dynare.org/trac/ticket/83|#83]] for the history of this issue.

Using Persistent Variables in Matlab

Persistent variables in Matlab permit to keep the value of a variable across calls to a given function. Because such routines may be used in different context and because Dynare line option noclearall doesn't clear persistent variables from one run to the next, it is necessary to properly initialize persistent variables and not to rely an implicit mechanism such as initializing when the persistent variable is empty.

Here is a list of functions that use persistent variables in an unsafe manner:

Functions not called by Dynare code

  • evaluate_likelihood.m (only called by evaluate_posterior_kernel.m)
  • masterParallelMan.m (only called by masterParallel.m)
  • moment_function.m (only called by simulated_moments_estimation.m)
  • perfect_foresight_simulaton.m
  • smm_objective.m

See trac ticket #83 for the history of this issue.

DynareWiki: PersistentVariables (last edited 2010-04-19 14:56:24 by SébastienVillemot)