...
|
...
|
@@ -246,7 +246,6 @@ if ~exist(figDir, 'dir') |
|
|
end
|
|
|
|
|
|
% close all;
|
|
|
|
|
|
Size = 8; % Number of channels per screenshot
|
|
|
n_c = size(D,1);
|
|
|
if n_c >= Size
|
...
|
...
|
@@ -254,15 +253,17 @@ if n_c >= Size |
|
|
for i2 = 1:tmp
|
|
|
figure(i2);
|
|
|
set(gcf,'Position',[629 -17 702 1101])
|
|
|
for i3 = 1:Size
|
|
|
if intersect(i3+(i2-1)*Size,interIdx) == i3+(i2-1)*Size
|
|
|
color = 'm'; % Channel doesn't have position and is bad
|
|
|
elseif intersect(i3+(i2-1)*Size,NaNbIdx) == i3+(i2-1)*Size
|
|
|
color = 'r'; %Bad channels will be printed in red
|
|
|
for i3 = 1:Size
|
|
|
if ~ismember(chanlabels(D,i3+(i2-1)*Size),D.csv_labels)
|
|
|
color = 'g'; % Channel was not matched with the .csv
|
|
|
elseif intersect(i3+(i2-1)*Size,ixNaN) == i3+(i2-1)*Size
|
|
|
color = 'b'; %NaN channels will be printed in blue
|
|
|
color = 'b'; % Channel was matched, is good, has NaN coordinates
|
|
|
elseif intersect(i3+(i2-1)*Size,interIdx) == i3+(i2-1)*Size
|
|
|
color = 'm'; % Channel was matched, is bad, has NaN coordinates
|
|
|
elseif intersect(i3+(i2-1)*Size,NaNbIdx) == i3+(i2-1)*Size
|
|
|
color = 'r'; % Channel was matched, is bad, has coordinates
|
|
|
else
|
|
|
color = 'k'; %Good channels will be printed in black
|
|
|
color = 'k'; % Channel was matched, is good, has coordinates
|
|
|
end
|
|
|
subplot(Size,1,i3)
|
|
|
plot(time(D),D(i3+(i2-1)*Size,:),color);
|
...
|
...
|
@@ -284,15 +285,17 @@ if n_c >= Size |
|
|
if rmd ~= 0
|
|
|
figure(tmp + 1)
|
|
|
set(gcf,'Position',[629 -17 702 1101])
|
|
|
for i4 = 1:rmd
|
|
|
if intersect(i3+(i2-1)*Size+i4,interIdx)== i3+(i2-1)*Size+i4
|
|
|
color = 'm';
|
|
|
elseif intersect(i3+(i2-1)*Size+i4,NaNbIdx)== i3+(i2-1)*Size+i4
|
|
|
color = 'r';
|
|
|
for i4 = 1:rmd
|
|
|
if ~ismember(chanlabels(D,i3+(i2-1)*Size+i4),D.csv_labels)
|
|
|
color = 'g'; % Channel was not matched with the .csv
|
|
|
elseif intersect(i3+(i2-1)*Size+i4,ixNaN) == i3+(i2-1)*Size+i4
|
|
|
color = 'b';
|
|
|
color = 'b'; % Channel was matched, is good, has NaN coordinates
|
|
|
elseif intersect(i3+(i2-1)*Size+i4,interIdx) == i3+(i2-1)*Size+i4
|
|
|
color = 'm'; % Channel was matched, is bad, has NaN coordinates
|
|
|
elseif intersect(i3+(i2-1)*Size+i4,NaNbIdx) == i3+(i2-1)*Size+i4
|
|
|
color = 'r'; % Channel was matched, is bad, has coordinates
|
|
|
else
|
|
|
color = 'k';
|
|
|
color = 'k'; % Channel was matched, is good, has coordinates
|
|
|
end
|
|
|
subplot(rmd,1,i4)
|
|
|
plot(time(D),D(i3+(i2-1)*Size+i4,:),color);
|
...
|
...
|
@@ -312,15 +315,17 @@ else |
|
|
figure(1)
|
|
|
set(gcf,'Position',[629 -17 702 1101])
|
|
|
for i5 = 1:n_c
|
|
|
if intersect(i5,interIdx)== i5
|
|
|
color = 'm';
|
|
|
elseif intersect(i5,NaNbIdx)== i5
|
|
|
color = 'r';
|
|
|
elseif intersect(i5,ixNaN)== i5
|
|
|
color = 'b';
|
|
|
if ~ismember(chanlabels(D,i5),D.csv_labels)
|
|
|
color = 'g'; % Channel was not matched with the .csv
|
|
|
elseif intersect(i5,ixNaN) == i5
|
|
|
color = 'b'; % Channel was matched, is good, has NaN coordinates
|
|
|
elseif intersect(i5,interIdx) == i5
|
|
|
color = 'm'; % Channel was matched, is bad, has NaN coordinates
|
|
|
elseif intersect(i5,NaNbIdx) == i5
|
|
|
color = 'r'; % Channel was matched, is bad, has coordinates
|
|
|
else
|
|
|
color = 'k';
|
|
|
end
|
|
|
color = 'k'; % Channel was matched, is good, has coordinates
|
|
|
end
|
|
|
subplot(n_c,1,i5)
|
|
|
plot(time(D),D(i5,:),color);
|
|
|
ylabel([num2str(i5) ' : ' D.chanlabels{i5}])
|
...
|
...
|
|