Home > functions > device > eeg > vb_eeginfo_get_read_channels.m

vb_eeginfo_get_read_channels

PURPOSE ^

return channel list to be read by channel list and read switch

SYNOPSIS ^

function [read_ch] = vb_eeginfo_get_read_channels(eeginfo,ch_list, read_swt, active_swt)

DESCRIPTION ^

 return channel list to be read by channel list and read switch
 [usage]
   [read_ch_list] = vb_eeginfo_get_read_channels(...
     eeginfo, ch_list, read_swt, active_swt)
 [input]
      eeginfo : <<struct>> EEGinfo
      ch_list : [Nchannel x 1] list of channel labels
     read_swt : <<boolean>> 'ch_list' is to be read or to be omitted?
              :   true) read
              :  false) omitted
   active_swt : <<boolean>> target channels are only active or not
              :   true) only active
              :  false) all the channels
 [output]
      read_ch : channel list to be read
 [note]
   basically arguments are not be checked
 [history]
   2008-06-06 (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:

SOURCE CODE ^

0001 function [read_ch] = vb_eeginfo_get_read_channels(eeginfo, ...
0002   ch_list, read_swt, active_swt)
0003 % return channel list to be read by channel list and read switch
0004 % [usage]
0005 %   [read_ch_list] = vb_eeginfo_get_read_channels(...
0006 %     eeginfo, ch_list, read_swt, active_swt)
0007 % [input]
0008 %      eeginfo : <<struct>> EEGinfo
0009 %      ch_list : [Nchannel x 1] list of channel labels
0010 %     read_swt : <<boolean>> 'ch_list' is to be read or to be omitted?
0011 %              :   true) read
0012 %              :  false) omitted
0013 %   active_swt : <<boolean>> target channels are only active or not
0014 %              :   true) only active
0015 %              :  false) all the channels
0016 % [output]
0017 %      read_ch : channel list to be read
0018 % [note]
0019 %   basically arguments are not be checked
0020 % [history]
0021 %   2008-06-06 (Sako) initial version
0022 %
0023 % Copyright (C) 2011, ATR All Rights Reserved.
0024 % License : New BSD License(see VBMEG_LICENSE.txt)
0025 
0026 if ~exist('active_swt', 'var'), active_swt = []; end
0027 if isempty(active_swt), active_swt = false; end;
0028 
0029 % ----- "base_list" is filtered by ActiveChannel if prescribed
0030 base_list = [vb_eeginfo_get_channel_label(eeginfo, active_swt); ...
0031              vb_eeginfo_get_channel_label_extra(eeginfo, active_swt)];
0032 
0033 % ----- matching specified channel list and filtered chanel list
0034 read_ch = vb_util_get_labels_to_read(base_list, ch_list, read_swt);
0035 return
0036 
0037 %%% END OF FILE %%%

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