Convert the results

Thank you very much. I asked AI how to write the code to flip results, it gave me this:

% Replace with your paths
surfaceFile = 'path_to_your_cortex_surface.mat';
resultFile = 'path_to_your_source_result.mat';

% Load the surface
Surface = load(surfaceFile);
% Load the results
Results = load(resultFile);
``

% Flip the x coordinate
Surface.Vertices(:, 2) = -Surface.Vertices(:, 2);

% Flip source activity
Results.GridOrient = -Results.GridOrient;
if isfield(Results, 'ImageGridAmp')
    Results.ImageGridAmp = -Results.ImageGridAmp;
end
if isfield(Results, 'ImagingKernel')
    Results.ImagingKernel = -Results.ImagingKernel;
end

newSurfaceFile = 'path_to_your_new_flipped_surface.mat';
newResultFile = 'path_to_your_new_flipped_source_result.mat';

% Save new surface
save(newSurfaceFile, '-struct', 'Surface');
% Save new results
save(newResultFile, '-struct', 'Results');

I am trying to run this code, it works well. And the results fliped successfully. Maybe someone also need this.