Home > functions > gui > preAnalysis > trial_extractor > vb_trial_extractor_remove_output_file.m

vb_trial_extractor_remove_output_file

PURPOSE ^

remove output file from output list.

SYNOPSIS ^

function [data] = vb_trial_extractor_remove_output_file(data, idx)

DESCRIPTION ^

 remove output file from output list.
 [USAGE]
    [data] = vb_trial_extractor_remove_output_file(data, idx);
 [IN]
    data : vb_trial_extractor object.
      ix : selected listbox index [Nx1]
 [OUT]
    data : vb_trial_extractor object.

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [data] = vb_trial_extractor_remove_output_file(data, idx)
0002 % remove output file from output list.
0003 % [USAGE]
0004 %    [data] = vb_trial_extractor_remove_output_file(data, idx);
0005 % [IN]
0006 %    data : vb_trial_extractor object.
0007 %      ix : selected listbox index [Nx1]
0008 % [OUT]
0009 %    data : vb_trial_extractor object.
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('idx', 'var')
0021     error('idx is a required parameter.');
0022 end
0023 if size(idx, 2) ~= 1
0024     error('idx should be [Nx1] vector');
0025 end
0026 
0027 %
0028 % --- Main Procedure
0029 %
0030 if length(data.output_file) >= size(idx, 1)
0031     data.output_file(idx) = []; % remove
0032 end
0033 
0034 %
0035 % --- After check
0036 %
0037 if nargout ~= 1
0038     error('function caller should receive vb_trial_extractor object.');
0039 end

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005