Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
a4681b50
Commit
a4681b50
authored
Jan 07, 2013
by
Sébastien Villemot
Browse files
Don't fail when all values are NaN/Inf
parent
7fe0e93e
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/dyntable.m
View file @
a4681b50
function
dyntable
(
title
,
headers
,
labels
,
values
,
label_width
,
val_width
,
...
val_precis
)
% Copyright (C) 2002-201
1
Dynare Team
% Copyright (C) 2002-201
3
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment