Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
83f809e0
Verified
Commit
83f809e0
authored
5 years ago
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
small fixes
parent
4e3490f9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#1599
passed
5 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/dyn_latex_table.m
+11
-11
11 additions, 11 deletions
matlab/dyn_latex_table.m
with
11 additions
and
11 deletions
matlab/dyn_latex_table.m
+
11
−
11
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'
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment