Loop over arguments while running dynare in matlab

Hi community, please need helpt with this:
i declare in my mod file

@#if magea==0
var e_a=1e-5;
var e_f=0;
@#endif

@#if magea==1
var e_a=1e-3;
var e_f=0;
@#endif

@#if magea==2
var e_a=0;
var e_f=1e-5;
@#endif

@#if magea==3
var e_a=0;
var e_f=1e-3;
@#endif

and wanna run them in matlab with the following loop but i got Error using dynare (line 282)
Dynare: preprocessing failed, i proved without a loop and i worked, how can i fix it

 magea_values = [0,1,2,3];

% Loop through the magea values
for j = 1:numel(magea_values)
magea = magea_values(j);

% Generate the additional arguments string
args = ['-Dlambda=1 -Dmagea=' num2str(magea)];

% Run the Dynare model with the specified parameters
dynare E2policy_model_tau.mod args;

Have a look at

Thanks so much