Skip to content

Commit

Permalink
Guard against NaNs in the voltage (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
alec-hoyland authored Oct 23, 2019
1 parent af7cbee commit 5b29e7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions @xolotl/rheobase.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
x.integrate;
V = x.integrate;

if any(isnan(V))
N = 1e9;
return
end

N = xtools.findNSpikes(V(:,1)) - nSpikes;
if N < 0
N = abs(I_ext);
Expand Down

0 comments on commit 5b29e7b

Please sign in to comment.