Skip to content

Commit

Permalink
Fix #26
Browse files Browse the repository at this point in the history
Note the possibility of missing Statistics Toolbox
  • Loading branch information
timothybrady committed Jul 1, 2015
1 parent 97a32e8 commit fea8609
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MemUtilities/EnsureAllModelMethods.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@

function s = sumWithNans(v)
if any(~isnan(v))
s = nansum(v);
try
s = nansum(v);
catch
error('It looks like you don''t have the function nansum(). This is most likely caused by not having the Statistics Toolbox, which is required for MemToolbox!');
end
else
s = NaN;
end
Expand Down

0 comments on commit fea8609

Please sign in to comment.