Home > eeg > egis > misc_utils > look_up_pairs.m

look_up_pairs

PURPOSE ^

SYNOPSIS ^

function [npairs, pairs, pairnames] = look_up_pairs(array,iarray,bad_chan,obs);

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [npairs, pairs, pairnames] = look_up_pairs(array,iarray,bad_chan,obs);
0002 ch_pair_indices;
0003 if isstr(array)
0004     [arrayh,hnames] = arrays(array,bad_chan(obs,find(bad_chan(obs,:))));
0005 else
0006     arrayh = array;
0007 end
0008 pairels = arrayh(iarray,find(arrayh(iarray,:)));
0009 npairs = size(pairels,2)*(size(pairels,2)+1)/2;
0010 pairs = zeros(1,npairs);
0011 ipairs = 1;
0012 for ip = 1:size(pairels,2)
0013     for jp=ip:size(pairels,2)
0014         pairs(ipairs) = chpair(pairels(ip),pairels(jp));
0015         ipairs = ipairs + 1;
0016     end;
0017 end;
0018 pairnames = hnames(iarray,:);

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003