Skip to content

Commit

Permalink
checked for nan
Browse files Browse the repository at this point in the history
  • Loading branch information
jovo committed Aug 1, 2016
1 parent ee6053b commit b65299f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fast_oopsi.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions run_oopsi.m
Original file line number Diff line number Diff line change
Expand Up @@ -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<T}, where X={n,C} or {n,C,h}, (smc.E), parameter estimates (smc.P), and structure of variables for algorithm (fast.V)

%% check data

if any(isnan(F));
error('nan in your data')
end


%% set code Variables

if nargin < 2, V = struct; end % create structure for algorithmic variables, if none provided
Expand Down Expand Up @@ -64,6 +71,8 @@
save(V.name_dat,'V')
end



%% preprocess - remove the lowest 10 frequencies

if V.preprocess==1
Expand Down

0 comments on commit b65299f

Please sign in to comment.