Skip to content

Commit

Permalink
fix a bug in neuron.initTemporal
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoupc committed Oct 11, 2018
1 parent f863c24 commit b80d3d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ca_source_extraction/utilities/HALS_temporal.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
tmpA = bsxfun(@times, A, 1./sum(A, 1));
ind_max = bsxfun(@eq, tmpA, max(tmpA, [], 2));
tmp_A = A.*double(ind_max);
C = bsxfun(@times, tmp_A'*Y, 1./sum(tmp_A.^2, 1)');
temp = sum(tmp_A.^2, 1)';
temp(temp==0) = 1; % in case tmp_A is 0
C = bsxfun(@times, tmp_A'*Y, 1./temp);
else
C_old = C;
end
Expand Down

0 comments on commit b80d3d3

Please sign in to comment.