brainfile = 'Subject.brain.mat'; currentfile = 'estimated_current.curr.mat'; figure; % Load standard brain of cortical model [V,F,xx] = vb_load_cortex(brainfile); % Load current and current information [Jinfo, J] = vb_load_current(currentfile); % get loaded data index between 80[msec] to 120[msec] ix = intersect(find(Jinfo.Tmsec>80), find(Jinfo.Tmsec<120)); % Average current between 80msec to 120msec Jplot = mean(J(:, ix), 2); % set viewpoint view([10, -2]); % plot current on cortical model plot_parm = vb_set_plot_parm; vb_plot_cortex(plot_parm,V,F,[],Jplot); axis equal; axis off;