ok. that is weird.
Can you check that the brainentropy toolbox is loaded? Also, can you check that when you open Brainstorm you don't have a message saying "BST> Invalid plug-in function: "process_inverse_mem.m" ?
If you have that, can you check what is the output of "which process_inverse_mem" ? it should be .brainstorm/plugins/brainentropy/best-brainstorm-master/processes/process_inverse_mem.m
In case that helps, i ask brainstorm to generate the script that calls MEM process:
% Script generated by Brainstorm (31-Mar-2023)
% Input files
sFiles = {'... .mat'};
% Start a new report
bst_report('Start', sFiles);
% Process: Compute sources: BEst
sFiles = bst_process('CallProcess', 'process_inverse_mem', sFiles, [], ...
'comment', '', ...
'mem', struct(...
'MEMpaneloptions', struct(...
'InverseMethod', 'MEM', ...
'automatic', struct(...
'MEMexpert', 1, ...
'version', '2.7.3', ...
'last_update', ''), ...
'clustering', struct(...
'neighborhood_order', 4, ...
'MSP_window', 10, ...
'clusters_type', 'static', ...
'MSP_scores_threshold', 0), ...
'optional', struct(...
'TimeSegment', [-20, 30], ...
'groupAnalysis', 0, ...
'Baseline', [], ...
'BaselineHistory', {{'within'}}, ...
'display', 0, ...
'BaselineSegment', [-20, 0]), ...
'mandatory', struct(...
'pipeline', 'cMEM'), ...
'model', struct(...
'active_mean_method', 2, ...
'alpha_method', 3, ...
'alpha_threshold', 0, ...
'initial_lambda', 1), ...
'solver', struct(...
'spatial_smoothing', 0.6, ...
'active_var_mult', 0.05, ...
'inactive_var_mult', 0, ...
'NoiseCov_method', 2, ...
'Optim_method', 'fminunc', ...
'parallel_matlab', 1, ...
'NoiseCov_recompute', 1))), ...
'sensortypes', 'EEG');
% Save and display report
ReportFile = bst_report('Save', sFiles);
bst_report('Open', ReportFile);
% bst_report('Export', ReportFile, ExportDir);
% bst_report('Email', ReportFile, username, to, subject, isFullReport);
% Delete temporary files
% gui_brainstorm('EmptyTempFolder');