1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- clear row
- clear col
- clear source
- clear target
- %% eliminates self connections
- for t = 1 : length(cross)
- cross(t,t) = 0;
- end
- %% eliminate NaN values
- cross(find(isnan(cross)))=0;
- %%
- % %% REMOVE ARTEFACTED CHANNELS
- % artefacted_channels = [4 19 37 46 62 63];
- % for u = 1 : length(artefacted_channels)
- % cross(artefacted_channels(u) , :)=0;
- % cross(: , artefacted_channels(u))=0;
- % end
- % %%
- %SELECT TRESHOLD VALUE%
- treshold=0.7; %for fixed threshold
- [row,col]=find(cross>treshold); %for fixed threshold
- if isempty(row)
- error('No correlations were found with the defined threshold value! Change the threshold value in cross_selection_correlated_channels.m')
- end
- j=0;
- for i=1:length(row)
-
-
- % if delay(row(i),col(i)) >= 0;
- j=j+1;
- % row(i)
- % col(i)
- % pause
- formatSpec = 'channels: %2.0f and %2.0f \n';
- fprintf(formatSpec,col(i),row(i))
- source(j)=col(i);
- target(j)=row(i);
- weight(j)=cross(row(i),col(i));
- % end
-
- end
- N=length(source);
- %%
- map()
|