Changing macro_expression outside of the .mod file

Dear all,

is it possible to change the expression of a MACRO_VARIABLE outside of the .mod file?

For example, I would like to be able to specify whether “deterministic_simul” is true or false in another Matlab file. Is that feasible?

@#define deterministic_simul = false

@#if deterministic_simul == true
@#include “ScenariosDeterministic.m”
@#include “ScenariosStochastic.m”


Yes, with the -D switch at the command line. See the manual and DSGE_mod/run_model_IRF_generation.m at master · JohannesPfeifer/DSGE_mod · GitHub for an example.

Perfect, thank you very much!