Home > vbmeg > functions > device > vb_info_set_pre_trigger.m

vb_info_set_pre_trigger

PURPOSE ^

info setter : pre-trigger

SYNOPSIS ^

function info = vb_info_set_pre_trigger(info, value)

DESCRIPTION ^

 info setter : pre-trigger
 [usage]
   info = vb_info_set_pre_trigger(info, value)
 [input]
    info : <required> <<struct>> MEGinfo or EEGinfo or other (unexpected)
   value : <optional> set value []
 [output]
    info : updated info
 [note]
   @see vb_meginfo_set_pre_trigger.m
   @see vb_eeginfo_set_pre_trigger.m
 [history]
   2007-08-02 (Sako) initial version

 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:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function info = vb_info_set_pre_trigger(info, value)
0002 % info setter : pre-trigger
0003 % [usage]
0004 %   info = vb_info_set_pre_trigger(info, value)
0005 % [input]
0006 %    info : <required> <<struct>> MEGinfo or EEGinfo or other (unexpected)
0007 %   value : <optional> set value []
0008 % [output]
0009 %    info : updated info
0010 % [note]
0011 %   @see vb_meginfo_set_pre_trigger.m
0012 %   @see vb_eeginfo_set_pre_trigger.m
0013 % [history]
0014 %   2007-08-02 (Sako) initial version
0015 %
0016 % Copyright (C) 2011, ATR All Rights Reserved.
0017 % License : New BSD License(see VBMEG_LICENSE.txt)
0018 
0019 % --- CHECK ARGUMENTS --- %
0020 if ~exist('info', 'var') info = []; end
0021 if ~exist('value', 'var') value = []; end;
0022 [info, value] = inner_check_arguments(info, value);
0023 
0024 % --- MAIN PROCEDURE --------------------------------------------------------- %
0025 %
0026 func_ = mfilename;
0027 
0028 my_measurement = vb_info_get_measurement(info);
0029 
0030 switch my_measurement
0031   case  'EEG'
0032     info = vb_eeginfo_set_pre_trigger(info, value);
0033   case  'MEG'
0034     info = vb_meginfo_set_pre_trigger(info, value);
0035   otherwise
0036     error('(%s)unexpected measurement : %s', func_, my_measurement);
0037 end
0038 
0039 return;
0040 %
0041 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0042 
0043 % --- INNER FUNCTIONS -------------------------------------------------------- %
0044 %
0045 % --- inner_check_arguments()
0046 %
0047 function [info, value] = inner_check_arguments(info, value)
0048 func_ = mfilename;
0049 if isempty(info)
0050   error('(%s)info is a required parameter', func_);
0051 end
0052 
0053 if isempty(value)
0054   % require no action - depend on particular functions
0055 end
0056 return;
0057 %
0058 % --- end of inner_check_arguments()
0059 %
0060 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0061 %%% END OF FILE %%%

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