For some reasons, I included my .mod in a matlab file .m.
However in my .mod I use macro variables
(for instance I use @#define VARshock = 0 or 1 which I use with a if condition to define whether my shocks have AR or VAR structure).
But I would like to define the value of my macrovariable (o or 1) in the .m, i.e “decide” in the .m whether my shocks have a VAR structure or not, without having to open and modify the .mod file. How could I do that?
@#define VARshock = 0
into a txt file in your m-file using e.g.
var_shock_indicator=1;
fid=fopen('par_def.txt','w+');
fprintf(fid,' @#define VARshock = %u \n',var_shock_indicator);
fclose(fid)
Then include this file in your mod-file using