1-I am reading from fif file from the tutorial in BST: mind004_050924_median01_raw.fif
2-Then I modify the coil_def.f.dat
3- I export the channel file to matlab, I modify it, then I import it from matlab
4-I compute the leadfield
------------due to your answer this leadfield is not corresponding to the correct one because as you said (the information from the file coil_def.dat is integrated in the channel file when loading data from Elekta .fif files).
This what I expected, for this I think to export the file to fif then load it again so that the integration happen, is this thinking right? but as I remember I did not succeed to export the file as fif, as I remember I exported to edf mind004_050924_median01_raw.edf
it could be exported to .fif?
If you are not reading from a .fif or a .res4 file, you would need to create your own function for adding the coil_def.dat information into your channel file. You can find some inspiration in the functions above.
can you please clarify more, so in my steps above 1,2, 3, at 3 I should create the function but how? I am beginner in BST I used it as user friendly interface, not coding, but I do not have problem to learn how to code on it.