Debian Codegraph @

tests/reporting/CommResidTablePage.m

raw
1 function rep = CommResidTablePage(rep, db_q, dc_q, trange, vline_after)
2 % Copyright © 2013-2023 Dynare Team
3 %
4 % This file is part of Dynare.
5 %
6 % Dynare is free software: you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation, either version 3 of the License, or
9 % (at your option) any later version.
10 %
11 % Dynare is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
15 %
16 % You should have received a copy of the GNU General Public License
17 % along with Dynare. If not, see <https://www.gnu.org/licenses/>.
18
19 seriesNames = {{'RES_LRPOIL_GAP_WORLD'}, ...
20 {'RES_LRPOIL_BAR_WORLD'}, ...
21 {'RES_LRPOIL_G_WORLD'}, ...
22 {'RES_LRPFOOD_GAP_WORLD'}, ...
23 {'RES_LRPFOOD_BAR_WORLD'}, ...
24 {'RES_LRPFOOD_G_WORLD'}};
25
26 rep.addTable('title', 'Commodities', ...
27 'range', trange, ...
28 'vlineAfter', vline_after);
29
30 for i = 1:length(seriesNames)
31 rep.addSeries('data', db_q{seriesNames{i}{1}});
32 delta = db_q{seriesNames{i}{1}} - dc_q{seriesNames{i}{1}};
33 delta.tex_rename_('$\Delta$');
34 rep.addSeries('data', delta, ...
35 'tableShowMarkers', true, ...
36 'tableAlignRight', true);
37 end
38 end