Remove data file from Input MEG/EEG file list. [USAGE] data = vb_signal_processor_remove_input_file(data, nth); [IN] data : Application data. nth : Nth item in MEG/EEG file listt. [OUT] data : Updated application data. Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function data = vb_signal_processor_remove_input_file(data, nth) 0002 % Remove data file from Input MEG/EEG file list. 0003 % [USAGE] 0004 % data = vb_signal_processor_remove_input_file(data, nth); 0005 % [IN] 0006 % data : Application data. 0007 % nth : Nth item in MEG/EEG file listt. 0008 % [OUT] 0009 % data : Updated application data. 0010 % 0011 % Copyright (C) 2011, ATR All Rights Reserved. 0012 % License : New BSD License(see VBMEG_LICENSE.txt) 0013 0014 % 0015 % --- Previous check 0016 % 0017 if ~exist('data', 'var') 0018 error('data is a required parameter.'); 0019 end 0020 if ~exist('nth', 'var') 0021 error('nth is a required parameter.'); 0022 end 0023 0024 % 0025 % --- Main Procedure 0026 % 0027 Nfile = length(data.input_files); 0028 if Nfile < nth 0029 error('Inconsistent file status (file list and selected item).'); 0030 end 0031 0032 % Remove 0033 data.input_files(nth) = []; 0034 data.output_files(nth) = []; 0035 0036 % 0037 % --- After check 0038 % 0039 if nargout ~= 1 0040 error('function caller should receive data object.'); 0041 end