"Generate .m script" to run wMEM

I still have issues actually: it looks like the fact that the script is extremely long

Maybe there is another bug in the .m script generator but I can't reproduce your error.
Can you please post screen captures showing:

  1. the files you have in input (Brainstorm figure showing the files in the database explorer + selected in the Process1 tab) and
  2. the options used for the MEM process?

Thanks