Home > vbmeg > functions > gui > batch > batch_mgr > vb_batch_mgr_add_variable.m

vb_batch_mgr_add_variable

PURPOSE ^

Add variable name to the table

SYNOPSIS ^

function [obj, errmsg] = vb_batch_mgr_add_varable(obj, variable_name)

DESCRIPTION ^

 Add variable name to the table

 [USAGE]
    [obj, errmsg] = vb_batch_mgr_add_varable(<obj, <variable_name>);
 [IN]
              obj : vb_batch_mgr object
    variable_name : variable name such as '$ID$', '$SUBJ$' [STRING]
 [OUT]
       obj : vb_batch_mgr object
    errmsg : If error is occured, the reason will be contained.

 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 [obj, errmsg] = vb_batch_mgr_add_varable(obj, variable_name)
0002 % Add variable name to the table
0003 %
0004 % [USAGE]
0005 %    [obj, errmsg] = vb_batch_mgr_add_varable(<obj, <variable_name>);
0006 % [IN]
0007 %              obj : vb_batch_mgr object
0008 %    variable_name : variable name such as '$ID$', '$SUBJ$' [STRING]
0009 % [OUT]
0010 %       obj : vb_batch_mgr object
0011 %    errmsg : If error is occured, the reason will be contained.
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
0015 
0016 %
0017 % --- Previous check
0018 %
0019 if ~exist('obj', 'var')
0020     error('obj is a required parameter.');
0021 end
0022 if ~exist('variable_name', 'var')
0023     error('obj is a required parameter.');
0024 end
0025 if ~ischar(variable_name) || isempty(variable_name)
0026     error('variable name is invalid');
0027 end
0028 
0029 %
0030 % --- Main Procedure
0031 %
0032 
0033 % Add variable
0034 [obj.table, errmsg] = ...
0035     vb_batch_variable_table_add_column(obj.table, variable_name);
0036 
0037 %
0038 % --- After check
0039 %
0040 if nargout < 1
0041     error('function caller should receive obj.');
0042 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005