Skip to content

Commit fea8609

Browse files
committed
Fix #26
Note the possibility of missing Statistics Toolbox
1 parent 97a32e8 commit fea8609

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MemUtilities/EnsureAllModelMethods.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232

3333
function s = sumWithNans(v)
3434
if any(~isnan(v))
35-
s = nansum(v);
35+
try
36+
s = nansum(v);
37+
catch
38+
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!');
39+
end
3640
else
3741
s = NaN;
3842
end

0 commit comments

Comments
 (0)