How to Export the Source Signals?

Hi Dear Brainstorm experts,

I just finished running source localization using a volumetric grid, but I need to run connectivity analysis local to the source signals in each voxel. Is there a way that I can output the source signals out to Matlab so that I can manipulate them there?

There is a function called bst_memory('GetConnectMatrix', m) that allows you to conveniently get the connectivity matrix, but is there a function to get the source signals?

I saw a function "in_bst_results" probably does the thing, but I am unsure about how to use it. Is there more in-depth tutorial of what the parameters mean?
https://neuroimage.usc.edu/brainstorm/Tutorials/SourceEstimation?highlight=(in_bst_results)

Here is the file structure I have if you found it useful:
Screen Shot 2021-10-09 at 4.08.42 PM

Thank you!

Check the code of the function:

Thank you @Francois.

I tried this code, and the ResultsFile is the "Absolute or relative path to the sources file to read". I tried saving to the data to local machine using the File > Export to File and put in the file path to the "ResultsFile" parameter. However, this function only look for files that are saved under the brainstorm_db folder. Should I go and check out the files in that folder to locate the file that I want to read into matlab?

This function in_bst_results is designed to read data from the database.
Do not try to export the file outside of the database first.
To get the full path to a file: right-click on the file > Copy file path to clipboard, then CTRL+V to paste it in your script.