⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elec_distance_consec.m

📁 Matlab下的EEG处理程序库
💻 M
字号:
function [C_e, C_d] = elec_distance_consec(dist_e, dist_d)

% ELEC_DISTANCE_CONSEC - Identify distance between nearest neighbour electrodes
% 
% Requires input data generated by 'elec_distance.m'
% Assumes using FUSA CNL electrode positions (Scan ECI-Cap)
%

% $Revision: 1.2 $ $Date: 2003/03/02 03:20:44 $

% Licence:  GNU GPL, no implied or express warranties
% History:  05/2000, Darren.Weber@flinders.edu.au
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  fprintf('\n%s\n\n', 'Calculating consecutive electrode distances.');


  End_e = strvcat('3', '5', '7', '9', '13', '22', '30', '41', '49', '54', '59', '67', '78', '86', '97', '101', '108', '110', '115', '117', '120', '124');

  C_e = cell(0);
  C_d = [];


  for row = 1:length(dist_d)
     
     % Check that row in dist_d matrix is non-zero

     NonZeroColumns = find(dist_d(row,:));

     if ~isempty(NonZeroColumns)

	  % Calculate consecutive electrode distance,
	  % excluding end electrodes defined in End_e
		
		if( (row+1) <= length(dist_e) )
     
			e = str2num(char(dist_e(row,row+1)));
			
			if(strmatch(num2str(e(1)), End_e, 'exact'))
	
				% found end electrode, do nothing
			else

				C_d(end + 1) = dist_d(row,row+1);
                                C_e(end + 1) = {num2str(e(1))};
			end
		end
	end
  end
  clear r x;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -