diff --git a/fast_oopsi.m b/fast_oopsi.m index 7b420e1..2ca8070 100755 --- a/fast_oopsi.m +++ b/fast_oopsi.m @@ -64,6 +64,14 @@ % P_best: inferred parameter structure % V: structure of Variables for algorithm to run + + +%% check data + +if any(isnan(F)); + error('nan in your data') +end + %% initialize algorithm Variables starttime = cputime; siz = size(F); if siz(2)==1, F=F'; siz=size(F); end diff --git a/run_oopsi.m b/run_oopsi.m index 7f657ef..cb2c9e0 100755 --- a/run_oopsi.m +++ b/run_oopsi.m @@ -20,6 +20,13 @@ % fast: fast-oopsi MAP estimate of spike train, argmax_{n\geq 0} P[n|F], (fast.n), parameter estimate (fast.P), and structure of variables for algorithm (fast.V) % smc: smc-oopsi estimate of {P[X_t|F]}_{t