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
Commits
16b5f711
Commit
16b5f711
authored
Oct 25, 2023
by
Johannes Pfeifer
Browse files
Options
Downloads
Patches
Plain Diff
Make naming of globals consistent
parent
f0a3c4bb
No related branches found
No related tags found
1 merge request
!8
Make naming of globals consistent
Changes
1
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
+
17
−
17
View file @
16b5f711
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.
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