Skip to content

Commit 1e25894

Browse files
committed
Fixed issue in ParadigmSpecCSP that would cause a crash if the training set has only one trial in one of its classes.
1 parent e287299 commit 1e25894

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/paradigms/ParadigmSpecCSP.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@
155155
for t = 1:size(s{c},1)
156156
s{c}(t,k) = w'*F{c}(:,:,k,t)*w; end
157157
end
158-
mu_s{c} = mean(s{c});
159-
var_s{c} = var(s{c});
158+
mu_s{c} = mean(s{c},1);
159+
var_s{c} = var(s{c},0,1);
160160
end
161161
% 10. update alpha{j} according to Eqs. (4) and (5)
162162
for c=1:2

0 commit comments

Comments
 (0)