Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
reporting
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Archives
reporting
Compare revisions
master to master
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
Archives/reporting
Select target project
No results found
master
Select Git revision
Branches
data_tables_rewrite_tex_option_of_stoch_simul
dynare-5.x
master
3 results
Swap
Target
JohannesPfeifer/reporting
Select target project
Archives/reporting
sebastien/reporting
JohannesPfeifer/reporting
3 results
master
Select Git revision
Branches
data_tables_rewrite_tex_option_of_stoch_simul
dynare-5.x
master
3 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Make naming of globals consistent
· 16b5f711
Johannes Pfeifer
authored
1 year ago
16b5f711
Merge branch 'naming' into 'master'
· 5dc59f4e
Sébastien Villemot
authored
1 year ago
Make naming of globals consistent See merge request Dynare/reporting!8
5dc59f4e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
macros/make_report_irfs.m
+17
-17
17 additions, 17 deletions
macros/make_report_irfs.m
with
17 additions
and
17 deletions
macros/make_report_irfs.m
View file @
5dc59f4e
function
make_report_irfs
(
M
,
oo
,
ticks_every
,
showOutput
)
function
make_report_irfs
(
M
_
,
oo
_
,
ticks_every
,
showOutput
)
% Builds canned IRF report
%
% INPUTS
% M
[struct]
% oo
[struct]
% M
_
[struct]
% oo
_
[struct]
% ticks_every [int] number of spaces between ticks. Default 5.
% showOutput [bool] showOutput the report. Default true
%
...
...
@@ -13,7 +13,7 @@ function make_report_irfs(M, oo, ticks_every, showOutput)
% SPECIAL REQUIREMENTS
% None
% Copyright © 2015-20
18
Dynare Team
% Copyright © 2015-20
23
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -30,24 +30,24 @@ function make_report_irfs(M, oo, ticks_every, showOutput)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
if
~
isfield
(
oo
,
'irfs'
)
if
~
isfield
(
oo
_
,
'irfs'
)
disp
(
'make_report_irfs: oo_.irfs does not exist'
);
return
end
fields
=
fieldnames
(
oo
.
irfs
);
fields
=
fieldnames
(
oo
_
.
irfs
);
if
isempty
(
fields
)
disp
(
'make_report_irfs: oo_.irfs is empty'
);
return
end
if
~
isfield
(
M
,
'exo_names'
)
if
~
isfield
(
M
_
,
'exo_names'
)
disp
(
'make_report_irfs: M_.exo_names does not exist'
);
return
end
if
~
isfield
(
M
,
'endo_names'
)
if
~
isfield
(
M
_
,
'endo_names'
)
disp
(
'make_report_irfs: M_.endo_names does not exist'
);
return
end
if
~
isfield
(
M
,
'fname'
)
if
~
isfield
(
M
_
,
'fname'
)
disp
(
'make_report_irfs: M_.fname does not exist'
);
return
end
...
...
@@ -65,15 +65,15 @@ end
n6
=
1
;
justAddedPage
=
0
;
calcxticks
=
false
;
r
=
report
(
'filename'
,
[
M
.
fname
'_canned_irf_report.tex'
],
'showOutput'
,
showOutput
);
for
i
=
1
:
length
(
M
.
exo_names
)
r
=
report
(
'filename'
,
[
M
_
.
fname
'_canned_irf_report.tex'
],
'showOutput'
,
showOutput
);
for
i
=
1
:
length
(
M
_
.
exo_names
)
newexo
=
1
;
for
j
=
1
:
length
(
M
.
endo_names
)
idx
=
ismember
(
fields
,
[
M
.
endo_names
{
j
}
'_'
M
.
exo_names
{
i
}]);
for
j
=
1
:
length
(
M
_
.
endo_names
)
idx
=
ismember
(
fields
,
[
M
_
.
endo_names
{
j
}
'_'
M
_
.
exo_names
{
i
}]);
if
(
mod
(
n6
-
1
,
6
)
==
0
&&
~
justAddedPage
)
||
...
(
newexo
&&
any
(
idx
))
r
=
r
.
addPage
(
'title'
,
{
'Canned Irf Report'
;
[
'shock '
...
strrep
(
M
.
exo_names
{
i
},
'_'
,
'\_'
)]});
strrep
(
M
_
.
exo_names
{
i
},
'_'
,
'\_'
)]});
r
=
r
.
addSection
(
'cols'
,
2
);
n6
=
1
;
justAddedPage
=
1
;
...
...
@@ -81,13 +81,13 @@ for i = 1:length(M.exo_names)
end
if
any
(
idx
)
if
~
calcxticks
data
=
dseries
(
oo
.
irfs
.
(
fields
{
idx
})
'
);
data
=
dseries
(
oo
_
.
irfs
.
(
fields
{
idx
})
'
);
xTicks
=
1
:
ticks_every
:
floor
(
data
.
nobs
/
ticks_every
)
*
ticks_every
+
1
;
xTickLabels
=
regexp
(
num2str
(
xTicks
-
1
),
'(?:\s)+'
,
'split'
);
calcxticks
=
true
;
end
r
=
r
.
addGraph
(
'data'
,
dseries
(
oo
.
irfs
.
(
fields
{
idx
})
'
),
...
'title'
,
M
.
endo_names
{
j
},
'_'
,
'\_'
),
...
r
=
r
.
addGraph
(
'data'
,
dseries
(
oo
_
.
irfs
.
(
fields
{
idx
})
'
),
...
'title'
,
M
_
.
endo_names
{
j
},
'_'
,
'\_'
),
...
'titleFormat'
,
'\Huge'
,
...
'showGrid'
,
false
,
...
'yTickLabelZeroFill'
,
false
,
...
...
...
This diff is collapsed.
Click to expand it.