Skip to content

Commit f5fd2ac

Browse files
committed
bugfix concerning normalization of the entropies
1 parent a74ad35 commit f5fd2ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rqa.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
l_prob = l_hist/sum(l_hist); % get probability distribution from histogram
148148
ent_Sum = (l_prob .* log(l_prob));
149149
if l_classes > 1
150-
y(5) = -nansum(ent_Sum)/log(N);
150+
y(5) = -nansum(ent_Sum)/log(N(1));
151151
else
152152
y(5) = -nansum(ent_Sum);
153153
end
@@ -227,7 +227,7 @@
227227
rt_prob = rt_hist/sum(rt_hist); % get probability distribution from histogram
228228
ent_Sum = (rt_prob .* log(rt_prob));
229229
if rt_classes > 1
230-
y(11) = -nansum(ent_Sum)/log(N);
230+
y(11) = -nansum(ent_Sum)/log(N(1));
231231
else
232232
y(11) = -nansum(ent_Sum);
233233
end

0 commit comments

Comments
 (0)