0001 function [closest,d]=nt_proximity(coordinates,N)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 nt_greetings();
0030
0031 if nargin<1; error('!'); end
0032 if nargin<2; N=[]; end
0033 if isempty(coordinates); error('!'); end
0034
0035 if ischar(coordinates)
0036 switch coordinates
0037 case {'biosemi256.lay','biosemi160.lay','biosemi128.lay', 'biosemi64.lay', 'biosemi32.lay', 'biosemi16.lay'};
0038 cfg.layout=coordinates;
0039 layout=ft_prepare_layout(cfg);
0040 coordinates=layout.pos;
0041 coordinates=coordinates(1:end-2,:);
0042 otherwise
0043 if exist (coordinates,'file') && numel(coordinates)>4 && all(coordinates(end-3:end)=='.lay')
0044 fid=fopen(coordinates);
0045 a=textscan(fid, '%d %f %f %f %f %s');
0046 fclose(fid);
0047 coordinates=[a{2},a{3}];
0048 elseif exist (coordinates,'file') && numel(coordinates)>4 && all(coordinates(end-3:end)=='.ced')
0049 fid=fopen(coordinates);
0050 a=textscan(fid,'%d%s%f%f%f%f%f%f%f%d', 'headerlines', 1);
0051 fclose(fid);
0052 coordinates=[a{5},a{6},a{7}];
0053 elseif exist (coordinates,'file') && numel(coordinates)>4 && all(coordinates(end-3:end)=='.loc')
0054 fid=fopen(coordinates);
0055 a=textscan(fid, '%d %f %f %s');
0056 fclose(fid);
0057 coordinates=[a{2},a{3}];
0058 elseif exist (coordinates,'file') && numel(coordinates)>4 && all(coordinates(end-3:end)=='.mat')
0059 load (coordinates);
0060 coordinates=lay.pos;
0061 coordinates=coordinates(1:end-2,:);
0062 end
0063 end
0064 end
0065
0066 if isnumeric(coordinates)
0067 if size(coordinates,1)==1
0068 if numel(coordinates)==2
0069 nrows=coordinates(1); ncols=coordinates(2);
0070 a=repmat(1:nrows,ncols,1); b=repmat((1:ncols)',1,nrows); c=[a(:),b(:)];
0071 [closest,d]=knnsearch(c,c,'K',N+1);
0072 closest=closest(:,2:end);
0073 d=d(:,2:end);
0074 else
0075 error('cuboids, etc not yet implemented');
0076 end
0077 else
0078 [nchans, ~]=size(coordinates);
0079 d=zeros(nchans);
0080 closest=zeros(nchans);
0081 for iChan=1:nchans
0082 d(iChan,:)=sqrt( sum( bsxfun(@minus,coordinates, coordinates(iChan,:)).^2, 2) )';
0083 [~,closest(iChan,:)]=sort(d(iChan,:)','ascend');
0084 end
0085 closest=closest(:,2:end);
0086 end
0087 elseif iscell(coordinates) && ischar(coordinates{1});
0088 nchans=numel(coordinates);
0089 elec=elec_1020all_cart;
0090 labels={elec(:).labels};
0091 c=[];
0092 for iChan=1:nchans
0093 idx=find(strcmp(deblank(coordinates{iChan}),deblank(labels)));
0094 if numel(idx) ~= 1; error(['label not recognized: ',coordinates{iChan}]); end
0095 c=[c;[elec(idx).X, elec(idx).Y, elec(idx).Z]];
0096 end
0097 [closest,d]=nt_proximity(c);
0098 else
0099 error('coordinates should be numeric or cell array of strings');
0100 end
0101
0102 if ~isempty(N);
0103 closest=closest(:,1:N);
0104 d=d(:,1:N);
0105 end
0106
0107
0108
0109 function [elec] = elec_1020all_cart
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159 names = {'LPA','RPA','Nz','Fp1','Fpz','Fp2','AF9','AF7','AF5','AF3',...
0160 'AF1','AFz','AF2','AF4','AF6','AF8','AF10','F9','F7','F5','F3','F1',...
0161 'Fz','F2','F4','F6','F8','F10','FT9','FT7','FC5','FC3','FC1','FCz',...
0162 'FC2','FC4','FC6','FT8','FT10','T9','T7','C5','C3','C1','Cz','C2',...
0163 'C4','C6','T8','T10','TP9','TP7','CP5','CP3','CP1','CPz','CP2','CP4',...
0164 'CP6','TP8','TP10','P9','P7','P5','P3','P1','Pz','P2','P4','P6','P8',...
0165 'P10','PO9','PO7','PO5','PO3','PO1','POz','PO2','PO4','PO6','PO8',...
0166 'PO10','O1','Oz','O2','I1','Iz','I2','AFp9h','AFp7h','AFp5h','AFp3h',...
0167 'AFp1h','AFp2h','AFp4h','AFp6h','AFp8h','AFp10h','AFF9h','AFF7h',...
0168 'AFF5h','AFF3h','AFF1h','AFF2h','AFF4h','AFF6h','AFF8h','AFF10h',...
0169 'FFT9h','FFT7h','FFC5h','FFC3h','FFC1h','FFC2h','FFC4h','FFC6h',...
0170 'FFT8h','FFT10h','FTT9h','FTT7h','FCC5h','FCC3h','FCC1h','FCC2h',...
0171 'FCC4h','FCC6h','FTT8h','FTT10h','TTP9h','TTP7h','CCP5h','CCP3h',...
0172 'CCP1h','CCP2h','CCP4h','CCP6h','TTP8h','TTP10h','TPP9h','TPP7h',...
0173 'CPP5h','CPP3h','CPP1h','CPP2h','CPP4h','CPP6h','TPP8h','TPP10h',...
0174 'PPO9h','PPO7h','PPO5h','PPO3h','PPO1h','PPO2h','PPO4h','PPO6h',...
0175 'PPO8h','PPO10h','POO9h','POO7h','POO5h','POO3h','POO1h','POO2h',...
0176 'POO4h','POO6h','POO8h','POO10h','OI1h','OI2h','Fp1h','Fp2h','AF9h',...
0177 'AF7h','AF5h','AF3h','AF1h','AF2h','AF4h','AF6h','AF8h','AF10h',...
0178 'F9h','F7h','F5h','F3h','F1h','F2h','F4h','F6h','F8h','F10h','FT9h',...
0179 'FT7h','FC5h','FC3h','FC1h','FC2h','FC4h','FC6h','FT8h','FT10h',...
0180 'T9h','T7h','C5h','C3h','C1h','C2h','C4h','C6h','T8h','T10h','TP9h',...
0181 'TP7h','CP5h','CP3h','CP1h','CP2h','CP4h','CP6h','TP8h','TP10h',...
0182 'P9h','P7h','P5h','P3h','P1h','P2h','P4h','P6h','P8h','P10h','PO9h',...
0183 'PO7h','PO5h','PO3h','PO1h','PO2h','PO4h','PO6h','PO8h','PO10h','O1h',...
0184 'O2h','I1h','I2h','AFp9','AFp7','AFp5','AFp3','AFp1','AFpz','AFp2',...
0185 'AFp4','AFp6','AFp8','AFp10','AFF9','AFF7','AFF5','AFF3','AFF1',...
0186 'AFFz','AFF2','AFF4','AFF6','AFF8','AFF10','FFT9','FFT7','FFC5',...
0187 'FFC3','FFC1','FFCz','FFC2','FFC4','FFC6','FFT8','FFT10','FTT9',...
0188 'FTT7','FCC5','FCC3','FCC1','FCCz','FCC2','FCC4','FCC6','FTT8',...
0189 'FTT10','TTP9','TTP7','CCP5','CCP3','CCP1','CCPz','CCP2','CCP4',...
0190 'CCP6','TTP8','TTP10','TPP9','TPP7','CPP5','CPP3','CPP1','CPPz',...
0191 'CPP2','CPP4','CPP6','TPP8','TPP10','PPO9','PPO7','PPO5','PPO3',...
0192 'PPO1','PPOz','PPO2','PPO4','PPO6','PPO8','PPO10','POO9','POO7',...
0193 'POO5','POO3','POO1','POOz','POO2','POO4','POO6','POO8','POO10',...
0194 'OI1','OIz','OI2','T3','T5','T4','T6'};
0195
0196 xyz = [ ...
0197 0.0000 0.9237 -0.3826 ;
0198 0.0000 -0.9237 -0.3826 ;
0199 0.9230 0.0000 -0.3824 ;
0200 0.9511 0.3090 0.0001 ;
0201 1.0000 0.0000 0.0001 ;
0202 0.9511 -0.3091 0.0000 ;
0203 0.7467 0.5425 -0.3825 ;
0204 0.8090 0.5878 0.0000 ;
0205 0.8553 0.4926 0.1552 ;
0206 0.8920 0.3554 0.2782 ;
0207 0.9150 0.1857 0.3558 ;
0208 0.9230 0.0000 0.3824 ;
0209 0.9150 -0.1857 0.3558 ;
0210 0.8919 -0.3553 0.2783 ;
0211 0.8553 -0.4926 0.1552 ;
0212 0.8090 -0.5878 0.0000 ;
0213 0.7467 -0.5425 -0.3825 ;
0214 0.5430 0.7472 -0.3826 ;
0215 0.5878 0.8090 0.0000 ;
0216 0.6343 0.7210 0.2764 ;
0217 0.6726 0.5399 0.5043 ;
0218 0.6979 0.2888 0.6542 ;
0219 0.7067 0.0000 0.7067 ;
0220 0.6979 -0.2888 0.6542 ;
0221 0.6726 -0.5399 0.5043 ;
0222 0.6343 -0.7210 0.2764 ;
0223 0.5878 -0.8090 0.0000 ;
0224 0.5429 -0.7472 -0.3826 ;
0225 0.2852 0.8777 -0.3826 ;
0226 0.3090 0.9511 0.0000 ;
0227 0.3373 0.8709 0.3549 ;
0228 0.3612 0.6638 0.6545 ;
0229 0.3770 0.3581 0.8532 ;
0230 0.3826 0.0000 0.9233 ;
0231 0.3770 -0.3581 0.8532 ;
0232 0.3612 -0.6638 0.6545 ;
0233 0.3373 -0.8709 0.3549 ;
0234 0.3090 -0.9511 0.0000 ;
0235 0.2852 -0.8777 -0.3826 ;
0236 -0.0001 0.9237 -0.3826 ;
0237 0.0000 1.0000 0.0000 ;
0238 0.0001 0.9237 0.3826 ;
0239 0.0001 0.7066 0.7066 ;
0240 0.0002 0.3824 0.9231 ;
0241 0.0002 0.0000 1.0000 ;
0242 0.0001 -0.3824 0.9231 ;
0243 0.0001 -0.7066 0.7066 ;
0244 0.0001 -0.9237 0.3826 ;
0245 0.0000 -1.0000 0.0000 ;
0246 0.0000 -0.9237 -0.3826 ;
0247 -0.2852 0.8777 -0.3826 ;
0248 -0.3090 0.9511 -0.0001 ;
0249 -0.3372 0.8712 0.3552 ;
0250 -0.3609 0.6635 0.6543 ;
0251 -0.3767 0.3580 0.8534 ;
0252 -0.3822 0.0000 0.9231 ;
0253 -0.3767 -0.3580 0.8534 ;
0254 -0.3608 -0.6635 0.6543 ;
0255 -0.3372 -0.8712 0.3552 ;
0256 -0.3090 -0.9511 -0.0001 ;
0257 -0.2853 -0.8777 -0.3826 ;
0258 -0.5429 0.7472 -0.3826 ;
0259 -0.5878 0.8090 -0.0001 ;
0260 -0.6342 0.7211 0.2764 ;
0261 -0.6724 0.5401 0.5045 ;
0262 -0.6975 0.2889 0.6545 ;
0263 -0.7063 0.0000 0.7065 ;
0264 -0.6975 -0.2889 0.6545 ;
0265 -0.6724 -0.5401 0.5045 ;
0266 -0.6342 -0.7211 0.2764 ;
0267 -0.5878 -0.8090 -0.0001 ;
0268 -0.5429 -0.7472 -0.3826 ;
0269 -0.7467 0.5425 -0.3825 ;
0270 -0.8090 0.5878 0.0000 ;
0271 -0.8553 0.4929 0.1555 ;
0272 -0.8918 0.3549 0.2776 ;
0273 -0.9151 0.1858 0.3559 ;
0274 -0.9230 0.0000 0.3824 ;
0275 -0.9151 -0.1859 0.3559 ;
0276 -0.8918 -0.3549 0.2776 ;
0277 -0.8553 -0.4929 0.1555 ;
0278 -0.8090 -0.5878 0.0000 ;
0279 -0.7467 -0.5425 -0.3825 ;
0280 -0.9511 0.3090 0.0000 ;
0281 -1.0000 0.0000 0.0000 ;
0282 -0.9511 -0.3090 0.0000 ;
0283 -0.8785 0.2854 -0.3824 ;
0284 -0.9230 0.0000 -0.3823 ;
0285 -0.8785 -0.2854 -0.3824 ;
0286 0.8732 0.4449 -0.1949 ;
0287 0.9105 0.4093 0.0428 ;
0288 0.9438 0.3079 0.1159 ;
0289 0.9669 0.1910 0.1666 ;
0290 0.9785 0.0647 0.1919 ;
0291 0.9785 -0.0647 0.1919 ;
0292 0.9669 -0.1910 0.1666 ;
0293 0.9438 -0.3079 0.1159 ;
0294 0.9105 -0.4093 0.0428 ;
0295 0.8732 -0.4449 -0.1949 ;
0296 0.6929 0.6929 -0.1949 ;
0297 0.7325 0.6697 0.1137 ;
0298 0.7777 0.5417 0.3163 ;
0299 0.8111 0.3520 0.4658 ;
0300 0.8289 0.1220 0.5452 ;
0301 0.8289 -0.1220 0.5452 ;
0302 0.8111 -0.3520 0.4658 ;
0303 0.7777 -0.5417 0.3163 ;
0304 0.7325 -0.6697 0.1138 ;
0305 0.6929 -0.6929 -0.1949 ;
0306 0.4448 0.8730 -0.1950 ;
0307 0.4741 0.8642 0.1647 ;
0308 0.5107 0.7218 0.4651 ;
0309 0.5384 0.4782 0.6925 ;
0310 0.5533 0.1672 0.8148 ;
0311 0.5533 -0.1672 0.8148 ;
0312 0.5384 -0.4782 0.6925 ;
0313 0.5107 -0.7218 0.4651 ;
0314 0.4741 -0.8642 0.1647 ;
0315 0.4448 -0.8730 -0.1950 ;
0316 0.1533 0.9678 -0.1950 ;
0317 0.1640 0.9669 0.1915 ;
0318 0.1779 0.8184 0.5448 ;
0319 0.1887 0.5466 0.8154 ;
0320 0.1944 0.1919 0.9615 ;
0321 0.1944 -0.1919 0.9615 ;
0322 0.1887 -0.5466 0.8154 ;
0323 0.1779 -0.8184 0.5448 ;
0324 0.1640 -0.9669 0.1915 ;
0325 0.1533 -0.9678 -0.1950 ;
0326 -0.1532 0.9678 -0.1950 ;
0327 -0.1639 0.9669 0.1915 ;
0328 -0.1778 0.8185 0.5449 ;
0329 -0.1883 0.5465 0.8153 ;
0330 -0.1940 0.1918 0.9611 ;
0331 -0.1940 -0.1918 0.9611 ;
0332 -0.1884 -0.5465 0.8153 ;
0333 -0.1778 -0.8185 0.5449 ;
0334 -0.1639 -0.9669 0.1915 ;
0335 -0.1533 -0.9678 -0.1950 ;
0336 -0.4448 0.8731 -0.1950 ;
0337 -0.4740 0.8639 0.1646 ;
0338 -0.5106 0.7220 0.4653 ;
0339 -0.5384 0.4786 0.6933 ;
0340 -0.5532 0.1673 0.8155 ;
0341 -0.5532 -0.1673 0.8155 ;
0342 -0.5384 -0.4786 0.6933 ;
0343 -0.5106 -0.7220 0.4653 ;
0344 -0.4740 -0.8638 0.1646 ;
0345 -0.4449 -0.8731 -0.1950 ;
0346 -0.6928 0.6928 -0.1950 ;
0347 -0.7324 0.6700 0.1139 ;
0348 -0.7776 0.5420 0.3167 ;
0349 -0.8108 0.3520 0.4659 ;
0350 -0.8284 0.1220 0.5453 ;
0351 -0.8284 -0.1220 0.5453 ;
0352 -0.8108 -0.3519 0.4659 ;
0353 -0.7775 -0.5421 0.3167 ;
0354 -0.7324 -0.6700 0.1139 ;
0355 -0.6928 -0.6928 -0.1950 ;
0356 -0.8730 0.4448 -0.1950 ;
0357 -0.9106 0.4097 0.0430 ;
0358 -0.9438 0.3080 0.1160 ;
0359 -0.9665 0.1908 0.1657 ;
0360 -0.9783 0.0647 0.1918 ;
0361 -0.9783 -0.0647 0.1918 ;
0362 -0.9665 -0.1908 0.1657 ;
0363 -0.9438 -0.3080 0.1160 ;
0364 -0.9106 -0.4097 0.0430 ;
0365 -0.8730 -0.4448 -0.1950 ;
0366 -0.9679 0.1533 -0.1950 ;
0367 -0.9679 -0.1533 -0.1950 ;
0368 0.9877 0.1564 0.0001 ;
0369 0.9877 -0.1564 0.0001 ;
0370 0.7928 0.5759 -0.1949 ;
0371 0.8332 0.5463 0.0810 ;
0372 0.8750 0.4284 0.2213 ;
0373 0.9053 0.2735 0.3231 ;
0374 0.9211 0.0939 0.3758 ;
0375 0.9210 -0.0939 0.3758 ;
0376 0.9053 -0.2735 0.3231 ;
0377 0.8750 -0.4284 0.2212 ;
0378 0.8332 -0.5463 0.0810 ;
0379 0.7927 -0.5759 -0.1949 ;
0380 0.5761 0.7929 -0.1949 ;
0381 0.6117 0.7772 0.1420 ;
0382 0.6549 0.6412 0.3987 ;
0383 0.6872 0.4214 0.5906 ;
0384 0.7045 0.1468 0.6933 ;
0385 0.7045 -0.1468 0.6933 ;
0386 0.6872 -0.4214 0.5906 ;
0387 0.6549 -0.6412 0.3987 ;
0388 0.6117 -0.7772 0.1420 ;
0389 0.5761 -0.7929 -0.1949 ;
0390 0.3027 0.9317 -0.1950 ;
0391 0.3235 0.9280 0.1813 ;
0392 0.3500 0.7817 0.5146 ;
0393 0.3703 0.5207 0.7687 ;
0394 0.3811 0.1824 0.9054 ;
0395 0.3811 -0.1824 0.9054 ;
0396 0.3703 -0.5207 0.7687 ;
0397 0.3500 -0.7817 0.5146 ;
0398 0.3235 -0.9280 0.1813 ;
0399 0.3028 -0.9317 -0.1950 ;
0400 0.0000 0.9801 -0.1950 ;
0401 0.0000 0.9801 0.1949 ;
0402 0.0001 0.8311 0.5552 ;
0403 0.0002 0.5550 0.8306 ;
0404 0.0001 0.1950 0.9801 ;
0405 0.0002 -0.1950 0.9801 ;
0406 0.0002 -0.5550 0.8306 ;
0407 0.0001 -0.8311 0.5552 ;
0408 0.0000 -0.9801 0.1949 ;
0409 0.0000 -0.9801 -0.1950 ;
0410 -0.3028 0.9319 -0.1949 ;
0411 -0.3234 0.9278 0.1813 ;
0412 -0.3498 0.7818 0.5148 ;
0413 -0.3699 0.5206 0.7688 ;
0414 -0.3808 0.1825 0.9059 ;
0415 -0.3808 -0.1825 0.9059 ;
0416 -0.3699 -0.5206 0.7688 ;
0417 -0.3498 -0.7818 0.5148 ;
0418 -0.3234 -0.9278 0.1813 ;
0419 -0.3028 -0.9319 -0.1949 ;
0420 -0.5761 0.7929 -0.1950 ;
0421 -0.6116 0.7771 0.1420 ;
0422 -0.6546 0.6411 0.3985 ;
0423 -0.6869 0.4217 0.5912 ;
0424 -0.7041 0.1469 0.6934 ;
0425 -0.7041 -0.1469 0.6934 ;
0426 -0.6870 -0.4216 0.5912 ;
0427 -0.6546 -0.6411 0.3985 ;
0428 -0.6116 -0.7771 0.1420 ;
0429 -0.5761 -0.7929 -0.1950 ;
0430 -0.7926 0.5759 -0.1950 ;
0431 -0.8331 0.5459 0.0809 ;
0432 -0.8752 0.4292 0.2219 ;
0433 -0.9054 0.2737 0.3233 ;
0434 -0.9210 0.0939 0.3757 ;
0435 -0.9210 -0.0940 0.3757 ;
0436 -0.9054 -0.2737 0.3233 ;
0437 -0.8752 -0.4292 0.2219 ;
0438 -0.8331 -0.5459 0.0809 ;
0439 -0.7926 -0.5758 -0.1950 ;
0440 -0.9877 0.1564 0.0000 ;
0441 -0.9877 -0.1564 0.0000 ;
0442 -0.9118 0.1444 -0.3824 ;
0443 -0.9118 -0.1444 -0.3824 ;
0444 0.8225 0.4190 -0.3825 ;
0445 0.8910 0.4540 0.0000 ;
0446 0.9282 0.3606 0.0817 ;
0447 0.9565 0.2508 0.1438 ;
0448 0.9743 0.1287 0.1828 ;
0449 0.9799 0.0000 0.1949 ;
0450 0.9743 -0.1287 0.1828 ;
0451 0.9565 -0.2508 0.1437 ;
0452 0.9282 -0.3606 0.0817 ;
0453 0.8910 -0.4540 0.0000 ;
0454 0.8225 -0.4191 -0.3825 ;
0455 0.6527 0.6527 -0.3825 ;
0456 0.7071 0.7071 0.0000 ;
0457 0.7564 0.6149 0.2206 ;
0458 0.7962 0.4535 0.3990 ;
0459 0.8221 0.2404 0.5148 ;
0460 0.8312 0.0000 0.5554 ;
0461 0.8221 -0.2404 0.5148 ;
0462 0.7962 -0.4535 0.3990 ;
0463 0.7564 -0.6149 0.2206 ;
0464 0.7071 -0.7071 0.0000 ;
0465 0.6527 -0.6527 -0.3825 ;
0466 0.4192 0.8226 -0.3826 ;
0467 0.4540 0.8910 0.0000 ;
0468 0.4932 0.8072 0.3215 ;
0469 0.5260 0.6110 0.5905 ;
0470 0.5477 0.3286 0.7685 ;
0471 0.5553 0.0000 0.8310 ;
0472 0.5477 -0.3286 0.7685 ;
0473 0.5260 -0.6110 0.5905 ;
0474 0.4932 -0.8072 0.3216 ;
0475 0.4540 -0.8910 0.0000 ;
0476 0.4192 -0.8226 -0.3826 ;
0477 0.1444 0.9119 -0.3826 ;
0478 0.1565 0.9877 0.0000 ;
0479 0.1713 0.9099 0.3754 ;
0480 0.1838 0.6957 0.6933 ;
0481 0.1922 0.3764 0.9059 ;
0482 0.1951 0.0000 0.9804 ;
0483 0.1922 -0.3764 0.9059 ;
0484 0.1838 -0.6957 0.6933 ;
0485 0.1713 -0.9099 0.3754 ;
0486 0.1564 -0.9877 0.0000 ;
0487 0.1444 -0.9119 -0.3826 ;
0488 -0.1444 0.9117 -0.3826 ;
0489 -0.1564 0.9877 -0.0001 ;
0490 -0.1711 0.9100 0.3754 ;
0491 -0.1836 0.6959 0.6936 ;
0492 -0.1918 0.3763 0.9056 ;
0493 -0.1948 0.0000 0.9800 ;
0494 -0.1919 -0.3763 0.9056 ;
0495 -0.1836 -0.6959 0.6936 ;
0496 -0.1711 -0.9100 0.3754 ;
0497 -0.1564 -0.9877 -0.0001 ;
0498 -0.1444 -0.9117 -0.3826 ;
0499 -0.4191 0.8225 -0.3826 ;
0500 -0.4540 0.8910 -0.0001 ;
0501 -0.4931 0.8073 0.3216 ;
0502 -0.5259 0.6109 0.5904 ;
0503 -0.5476 0.3285 0.7685 ;
0504 -0.5551 0.0000 0.8311 ;
0505 -0.5475 -0.3286 0.7685 ;
0506 -0.5258 -0.6109 0.5904 ;
0507 -0.4931 -0.8073 0.3216 ;
0508 -0.4540 -0.8910 -0.0001 ;
0509 -0.4191 -0.8225 -0.3826 ;
0510 -0.6529 0.6529 -0.3825 ;
0511 -0.7071 0.7071 0.0000 ;
0512 -0.7561 0.6147 0.2205 ;
0513 -0.7960 0.4537 0.3995 ;
0514 -0.8218 0.2405 0.5152 ;
0515 -0.8306 0.0000 0.5551 ;
0516 -0.8218 -0.2405 0.5152 ;
0517 -0.7960 -0.4537 0.3995 ;
0518 -0.7562 -0.6147 0.2205 ;
0519 -0.7071 -0.7071 0.0000 ;
0520 -0.6529 -0.6529 -0.3825 ;
0521 -0.8228 0.4191 -0.3824 ;
0522 -0.8910 0.4540 0.0000 ;
0523 -0.9283 0.3608 0.0818 ;
0524 -0.9567 0.2511 0.1442 ;
0525 -0.9739 0.1285 0.1822 ;
0526 -0.9797 0.0000 0.1949 ;
0527 -0.9739 -0.1286 0.1822 ;
0528 -0.9567 -0.2511 0.1442 ;
0529 -0.9283 -0.3608 0.0818 ;
0530 -0.8910 -0.4540 0.0000 ;
0531 -0.8228 -0.4191 -0.3824 ;
0532 -0.9322 0.3029 -0.1949 ;
0533 -0.9799 0.0000 -0.1949 ;
0534 -0.9322 -0.3029 -0.1949 ;
0535 0.0000 1.0000 0.0000 ;
0536 -0.5878 0.8090 -0.0001 ;
0537 0.0000 -1.0000 0.0000 ;
0538 -0.5878 -0.8090 -0.0001 ]';
0539
0540
0541 elec = struct(...
0542 'labels',names,...
0543 'X',num2cell(xyz(1,:)),...
0544 'Y',num2cell(xyz(2,:)),...
0545 'Z',num2cell(xyz(3,:)));
0546
0547
0548 return
0549
0550
0551
0552
0553
0554
0555
0556
0557
0558
0559
0560
0561
0562
0563
0564
0565
0566
0567
0568
0569
0570
0571
0572
0573
0574
0575
0576
0577
0578
0579
0580
0581
0582
0583
0584
0585
0586
0587
0588
0589
0590
0591
0592
0593
0594
0595
0596
0597
0598
0599
0600
0601
0602
0603
0604
0605
0606
0607
0608
0609
0610
0611
0612
0613
0614
0615
0616
0617
0618
0619
0620
0621
0622
0623
0624
0625
0626
0627
0628
0629
0630
0631
0632
0633
0634
0635
0636
0637
0638
0639
0640
0641
0642
0643
0644
0645
0646
0647
0648
0649
0650
0651
0652
0653
0654
0655
0656
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667
0668
0669
0670
0671
0672
0673
0674
0675
0676
0677
0678
0679
0680
0681
0682
0683
0684
0685
0686
0687
0688
0689
0690
0691
0692
0693
0694
0695
0696
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706
0707
0708
0709
0710
0711
0712
0713
0714
0715
0716
0717
0718
0719
0720
0721
0722
0723
0724
0725
0726
0727
0728
0729
0730
0731
0732
0733
0734
0735
0736
0737
0738
0739
0740
0741
0742
0743
0744
0745
0746
0747
0748
0749
0750
0751
0752
0753
0754
0755
0756
0757
0758
0759
0760
0761
0762
0763
0764
0765
0766
0767
0768
0769
0770
0771
0772
0773
0774
0775
0776
0777
0778
0779
0780
0781
0782
0783
0784
0785
0786
0787
0788
0789
0790
0791
0792
0793
0794
0795
0796
0797
0798
0799
0800
0801
0802
0803
0804
0805
0806
0807
0808
0809
0810
0811
0812
0813
0814
0815
0816
0817
0818
0819
0820
0821
0822
0823
0824
0825
0826
0827
0828
0829
0830
0831
0832
0833
0834
0835
0836
0837
0838
0839
0840
0841
0842
0843
0844
0845
0846
0847
0848
0849
0850
0851
0852
0853
0854
0855
0856
0857
0858
0859
0860
0861
0862
0863
0864
0865
0866
0867
0868
0869
0870
0871
0872
0873
0874
0875
0876
0877
0878
0879
0880
0881
0882
0883
0884
0885
0886
0887
0888
0889
0890
0891