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
Dynare
reporting
Commits
4a1c2afa
Commit
4a1c2afa
authored
Jul 28, 2014
by
Houtan Bastani
Browse files
reporting: minor aesthetic changes to table and code simplifications
parent
7d18adf7
Changes
1
Show whitespace changes
Inline
Side-by-side
@report_table/writeTableFile.m
View file @
4a1c2afa
...
...
@@ -68,25 +68,18 @@ fprintf(fid, '\\setlength{\\tabcolsep}{4pt}\n');
fprintf
(
fid
,
'\\begin{tabular}{@{}l'
);
for
i
=
1
:
ndates
if
o
.
showVlines
fprintf
(
fid
,
'r|'
);
else
fprintf
(
fid
,
'r'
);
if
o
.
vlineAfterEndOfPeriod
if
dates
(
i
)
.
time
(
2
)
==
dates
(
i
)
.
freq
if
o
.
showVlines
fprintf
(
fid
,
'|'
);
end
end
if
~
isempty
(
o
.
vlineAfter
)
elseif
o
.
vlineAfterEndOfPeriod
&&
dates
(
i
)
.
time
(
2
)
==
dates
(
i
)
.
freq
fprintf
(
fid
,
'|'
);
else
if
~
isempty
(
o
.
vlineAfter
)
for
j
=
1
:
length
(
o
.
vlineAfter
)
if
dates
(
i
)
==
o
.
vlineAfter
{
j
}
if
~
(
o
.
vlineAfterEndOfPeriod
&&
dates
(
i
)
.
time
(
2
)
==
dates
(
i
)
.
freq
)
fprintf
(
fid
,
'|'
);
end
end
end
end
end
end
datedata
=
dates
.
time
;
years
=
unique
(
datedata
(:,
1
));
...
...
@@ -140,7 +133,7 @@ else
for
i
=
1
:
length
(
rhscols
)
fprintf
(
fid
,
' & %s'
,
rhscols
{
i
});
end
fprintf
(
fid
,
'\\\\\
\cline{%d-%d}%%\n'
,
nlhc
+
1
,
ncols
);
fprintf
(
fid
,
'\\\\\
n'
);
switch
dates
.
freq
case
4
sep
=
'Q'
;
...
...
@@ -154,7 +147,20 @@ else
for
i
=
1
:
size
(
thdr
,
1
)
period
=
thdr
{
i
,
2
};
for
j
=
1
:
size
(
period
,
2
)
fprintf
(
fid
,
' & \\multicolumn{1}{c}{%s%d}'
,
sep
,
period
(
j
));
fprintf
(
fid
,
' & \\multicolumn{1}{c'
);
if
o
.
showVlines
fprintf
(
fid
,
'|'
);
elseif
o
.
vlineAfterEndOfPeriod
&&
j
==
size
(
period
,
2
)
fprintf
(
fid
,
'|'
);
elseif
~
isempty
(
o
.
vlineAfter
)
for
k
=
1
:
length
(
o
.
vlineAfter
)
if
o
.
vlineAfter
{
k
}
.
time
(
1
)
==
thdr
{
i
}
&&
...
o
.
vlineAfter
{
k
}
.
time
(
2
)
==
period
(
j
)
fprintf
(
fid
,
'|'
);
end
end
end
fprintf
(
fid
,
'}{%s%d}'
,
sep
,
period
(
j
));
end
end
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