📄 elec_distance_nn.m
字号:
function [NN_e, NN_d] = elec_distance_nn(dist_e, dist_d)
% ELEC_DISTANCE_NN - Identify distance between nearest neighbour electrodes.
%
% Requires input data generated by 'elec_distance.m'
%
% Useage [NN_e, NN_d] = elec_distance_nn(dist_e, dist_d)
%
% where: dist_e & dist_d are derived from 'elec_distance'
% utility and NN_e and NN_d are matrices that contain
% nearest neighbour electrode labels and distances,
% respectively.
%
% $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 nearest neighbour electrode distances.');
NN_e = cell(0);
NN_d = [];
for r = 1:length(dist_d(:,1))
% Sort row r of dist_d in ascending order
[NN_d(end + 1,:), index] = sort(dist_d(r,:));
% Sort electrode labels in same order
NN_e(end + 1,:) = dist_e(r,index);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -