tag for classifying trial [USAGE] [tag_obj] = vb_tag_new(tag_name); [IN] tag_name : tag name [string] [OUT] tag_obj : tag object Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [tag_obj] = vb_tag_new(tag_name) 0002 % tag for classifying trial 0003 % 0004 % [USAGE] 0005 % [tag_obj] = vb_tag_new(tag_name); 0006 % [IN] 0007 % tag_name : tag name [string] 0008 % [OUT] 0009 % tag_obj : tag 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('tag_name', 'var') 0018 error('tag_name is a required parameter.'); 0019 end 0020 if ~ischar(tag_name) 0021 error('tag name should be string.'); 0022 end 0023 0024 % 0025 % --- Main Procedure 0026 % 0027 tag_obj = struct; 0028 tag_obj.name = tag_name; 0029 tag_obj.trial_ix = []; 0030 0031 % 0032 % --- After check 0033 % 0034 if nargout ~= 1 0035 error('function caller should receive tag_obj.'); 0036 end