From b65299f98777b5e917314f2b7bc8655caf1dd9f1 Mon Sep 17 00:00:00 2001 From: joshua vogelstein Date: Mon, 1 Aug 2016 09:14:21 -0400 Subject: [PATCH] checked for nan --- fast_oopsi.m | 8 ++++++++ run_oopsi.m | 9 +++++++++ 2 files changed, 17 insertions(+) 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