Skip to content
Snippets Groups Projects
Commit a4681b50 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Don't fail when all values are NaN/Inf

parent 7fe0e93e
Branches
Tags
No related merge requests found
function dyntable(title,headers,labels,values,label_width,val_width, ...
val_precis)
% Copyright (C) 2002-2011 Dynare Team
% Copyright (C) 2002-2013 Dynare Team
%
% This file is part of Dynare.
%
......@@ -30,7 +30,11 @@ label_width = max(size(deblank(char(headers(1,:),labels)),2))+2;
label_fmt = sprintf('%%-%ds',label_width);
values_length = max(ceil(max(max(log10(abs(values(isfinite(values))))))),1)+val_precis+1;
if all(~isfinite(values))
values_length = 4;
else
values_length = max(ceil(max(max(log10(abs(values(isfinite(values))))))),1)+val_precis+1;
end
if any(values) < 0
values_length = values_length+1;
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment