Home > vbmeg > functions > device > eeg > vb_eeginfo_get_device.m

vb_eeginfo_get_device

PURPOSE ^

<<getter>> return device from EEGinfo

SYNOPSIS ^

function [device] = vb_eeginfo_get_device(eeginfo)

DESCRIPTION ^

 <<getter>> return device from EEGinfo
 [usage]
   [device] = vb_eeginfo_get_device(eeginfo)
 [input]
   eeginfo : <required> <<struct>> EEGinfo
 [output]
    device : device name
 [note]
 
 [history]
   2008-02-26 (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 [device] = vb_eeginfo_get_device(eeginfo)
0002 % <<getter>> return device from EEGinfo
0003 % [usage]
0004 %   [device] = vb_eeginfo_get_device(eeginfo)
0005 % [input]
0006 %   eeginfo : <required> <<struct>> EEGinfo
0007 % [output]
0008 %    device : device name
0009 % [note]
0010 %
0011 % [history]
0012 %   2008-02-26 (Sako) initial version
0013 %
0014 % Copyright (C) 2011, ATR All Rights Reserved.
0015 % License : New BSD License(see VBMEG_LICENSE.txt)
0016 
0017 % --- CHECK ARGUMENTS --- %
0018 if ~exist('eeginfo', 'var'), eeginfo = []; end
0019 [eeginfo] = inner_check_arguments(eeginfo);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 if ~isfield(eeginfo, 'Device');
0024   device = '';
0025 else
0026   device = eeginfo.Device;
0027 end
0028 return;
0029 %
0030 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0031 
0032 % --- INNER FUNCTIONS -------------------------------------------------------- %
0033 %
0034 % --- inner_check_arguments()
0035 %
0036 function [eeginfo] = inner_check_arguments(eeginfo)
0037 func_ = mfilename;
0038 if isempty(eeginfo)
0039   error('(%s)eeginfo is a required parameter', func_);
0040 end
0041 return;
0042 %
0043 % --- end of inner_check_arguments()
0044 %
0045 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0046 
0047 
0048 %%% END OF FILE %%%

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