Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Camilo Marchesini
dynare
Commits
83f809e0
Verified
Commit
83f809e0
authored
Aug 09, 2019
by
Houtan Bastani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fixes
parent
4e3490f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
matlab/dyn_latex_table.m
matlab/dyn_latex_table.m
+11
-11
No files found.
matlab/dyn_latex_table.m
View file @
83f809e0
function
dyn_latex_table
(
M_
,
options_
,
title
,
LaTeXtitle
,
headers
,
labels
,
values
,
label_width
,
val_width
,
val_precis
,
optional_header
)
%function dyn_latex_table(M_, options_, title, LaTeXtitle, headers, labels, values, label_width, val_width, val_precis, optional_header)
%function dyn_latex_table(M_,options_,title,LaTeXtitle,headers,labels,values,label_width,val_width,val_precis,optional_header)
% Copyright (C) 2015-2018 Dynare Team
% Copyright (C) 2015-2019 Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -23,6 +22,10 @@ if options_.noprint
return
end
if
length
(
headers
)
<
2
error
(
'headers length must be >= 2'
)
end
OutputDirectoryName
=
CheckPath
(
'Output'
,
M_
.
dname
);
% Set width of label column
...
...
@@ -52,13 +55,10 @@ value_format = sprintf('%%%d.%df', val_width, val_precis);
header_string_format
=
sprintf
(
'$%%%ds$'
,
val_width
);
% Create and print header string
if
length
(
headers
)
>
0
header_string
=
sprintf
(
label_format_leftbound
,
strrep
(
headers
{
1
},
'\'
,
'\\'
));
header_code_string
=
'l'
;
for
i
=
2
:
length
(
headers
)
header_string
=
[
header_string
'\t & \t '
sprintf
(
header_string_format
,
strrep
(
headers
{
i
},
'\'
,
'\\'
))];
header_code_string
=
[
header_code_string
'c'
];
end
header_string
=
sprintf
(
label_format_leftbound
,
strrep
(
headers
{
1
},
'\'
,
'\\'
));
header_code_string
=
[
'l'
repmat
(
'c'
,
1
,
length
(
headers
)
-
1
)];
for
i
=
2
:
length
(
headers
)
header_string
=
[
header_string
'\t & \t '
sprintf
(
header_string_format
,
strrep
(
headers
{
i
},
'\'
,
'\\'
))];
end
header_string
=
[
header_string
'\\\\\n'
];
...
...
@@ -70,7 +70,7 @@ fprintf(fidTeX, ['%% ' datestr(now,0) ', created by ' stack(2).file]);
fprintf
(
fidTeX
,
' \n'
);
fprintf
(
fidTeX
,
' \n'
);
fprintf
(
fidTeX
,
'\\begin{center}\n'
);
fprintf
(
fidTeX
,
[
'\\begin{longtable}{%s} \n'
]
,
header_code_string
);
fprintf
(
fidTeX
,
'\\begin{longtable}{%s} \n'
,
header_code_string
);
fprintf
(
fidTeX
,
[
'\\caption{'
,
title
,
'}\\\\\n '
]);
fprintf
(
fidTeX
,
[
'\\label{Table:'
,
LaTeXtitle
,
'}\\\\\n'
]);
...
...
Write
Preview
Markdown
is supported
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