Importing a leadfield matrix from a .mat file

mne.io.RawArray can do it for raw data,
We see also the forward model as a .fif file,
What about if we have a lead field matrix in .mat file and we need to convert it to .fif file?
Thank you in advance!

Hello @zahransa and welcome to the forum!

I have moved your message to a new topic, as he one you posted it to was already resolved and covered a slightly different question.

As for your actual question: It depends on how the .mat file is organized. One can store basically arbitrary information in a .mat file, and you’ll have to figure out the structure to extract the leadfield matrix correctly. I suppose no-one will be able to really help unless you share the data or at least describe how it was produced.

Best wishes,

Richard