This is a constructor of vb_batch_variable_table class. This class preserves 2D matrix of variable. [USAGE] [obj] = vb_batch_variable_table_new([column_name_list][,table]) [IN] column_name_list : Column name list for table [OUT] obj : vb_batch_variable_table Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [obj] = vb_batch_variable_table_new(column_name_list) 0002 % This is a constructor of vb_batch_variable_table class. 0003 % This class preserves 2D matrix of variable. 0004 % [USAGE] 0005 % [obj] = vb_batch_variable_table_new([column_name_list][,table]) 0006 % [IN] 0007 % column_name_list : Column name list for table 0008 % [OUT] 0009 % obj : vb_batch_variable_table 0010 % 0011 % Copyright (C) 2011, ATR All Rights Reserved. 0012 % License : New BSD License(see VBMEG_LICENSE.txt) 0013 0014 0015 % 0016 % --- Previous check 0017 % 0018 if ~exist('column_name_list', 'var') 0019 column_name_list = {'$ID$'}; 0020 end 0021 if ~exist('table', 'var') 0022 data = cell(0); 0023 table{1,1} = 'SBJ1'; 0024 end 0025 0026 if ~iscellstr(column_name_list) 0027 error('column_name_list should include only string'); 0028 end 0029 0030 if ~iscellstr(table) 0031 error('table should include only string'); 0032 end 0033 0034 % 0035 % --- Main Procedure 0036 % 0037 0038 0039 % obj. 0040 % column_name_list = {'$VAR1$', '$VAR2$'} {1xN} 0041 % table = {1,1} {1,2} {NxM} 0042 % {2,1}, {2,2}, 0043 % ... ... 0044 obj = struct; 0045 obj.column_name_list = column_name_list; 0046 obj.table = table; 0047 0048 % 0049 % --- After check 0050 % 0051 if nargout < 1 0052 error('function caller should receive obj.'); 0053 end