The relation between Scouts and brain grid

If you obtained what you want from the interface, you just have to follow in the code how it was done.
First you need to create a "full source file" (matrix ImageGridAmp with zero everywhere except where your simulated signal is), and then multiply it with the forward model.

Put a breakpoint at the beginning of the Run() function in process_simulate_recordings.m, start the simulation from the Process1 tab, and when the debugger stops start executing line by line the code, exploring the contents of the variables at each step:
https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/process/functions/process_simulate_recordings.m#L82

If you are not familiar with the Matlab debugger, search first for a tutorial about it, this is a very powerful tool to follow code execution.

1 Like