Home > functions > device > eeg > vb_eeginfo_set_sensor_position.m

vb_eeginfo_set_sensor_position

PURPOSE ^

set sensor position data to EEGinfo struct

SYNOPSIS ^

function EEGinfo = vb_eeginfo_set_sensor_position(EEGinfo, position)

DESCRIPTION ^

 set sensor position data to EEGinfo struct
 [usage]
   EEGinfo = vb_eeginfo_set_sensor_position( EEGinfo, position )
 [input]
    EEGinfo : <required> EEGinfo struct data
   position : <optional> 3-D coordinates of sensor [n_sensor x 3] []
 [output]
    EEGinfo : updated EEGinfo
 [note]
   @see vb_eeginfo_get_sensor_position
 [history]
   2006-12-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:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function EEGinfo = vb_eeginfo_set_sensor_position(EEGinfo, position)
0002 % set sensor position data to EEGinfo struct
0003 % [usage]
0004 %   EEGinfo = vb_eeginfo_set_sensor_position( EEGinfo, position )
0005 % [input]
0006 %    EEGinfo : <required> EEGinfo struct data
0007 %   position : <optional> 3-D coordinates of sensor [n_sensor x 3] []
0008 % [output]
0009 %    EEGinfo : updated EEGinfo
0010 % [note]
0011 %   @see vb_eeginfo_get_sensor_position
0012 % [history]
0013 %   2006-12-06 (Sako) initial version
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 % --- CHECK ARGUMENTS --- %
0019 if ~exist('EEGinfo', 'var'), EEGinfo = []; end
0020 if ~exist('position', 'var'), position = []; end
0021 [EEGinfo, position] = inner_check_arguments(EEGinfo, position);
0022 
0023 % --- MAIN PROCEDURE --------------------------------------------------------- %
0024 %
0025 EEGinfo.Coord = position;
0026 return;
0027 %
0028 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0029 
0030 % --- INNER FUNCTIONS -------------------------------------------------------- %
0031 %
0032 % --- inner_check_arguments()
0033 %
0034 function [EEGinfo, position] = inner_check_arguments(EEGinfo, position)
0035 func_ = mfilename;
0036 if isempty(EEGinfo)
0037   error('(%s)EEGinfo is a required parameter', func_);
0038 end
0039 
0040 if isempty(position)
0041   % require no action
0042 end
0043 return;
0044 %
0045 % --- end of inner_check_arguments()
0046 %
0047 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0048 
0049 %%% END OF FILE %%%

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