% interface_ADJ() - Run ADJUST algorithm on EEG data % % Usage: % >> EEG=interface_ADJ(EEG,report); % % Inputs and outputs: % EEG - current dataset structure or structure array % % Input: % report - (string) report file name % % % Copyright (C) 2009-2014 Andrea Mognon (1) and Marco Buiatti (2), % (1) Center for Mind/Brain Sciences, University of Trento, Italy % (2) INSERM U992 - Cognitive Neuroimaging Unit, Gif sur Yvette, France % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2 of the License, or % (at your option) any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA % % % REVISION HISTORY: % % 09/04/14: dir and filename removed from call of the function because % unused (MB). % % 30/03/14: line 51: added test for ICA and for number of ICs = number of channels % (MB). % % 20/03/14: line 73 commented out to avoid baseline removal. MB. function EEG = interface_ADJ (EEG,report) % Epoching % ---------------------------------------------------- % | NOTE: epochs are extracted ONLY to make | % | ArtifactADJUST run | % ---------------------------------------------------- % Check that ICA has been computed if isempty(EEG.icaweights) warning('Please compute ICA before running ADJUST.'); return; end; % Check that number of ICs = number of channels if size(EEG.icaweights,1)