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
4598dba4
Verified
Commit
4598dba4
authored
1 year ago
by
Johannes Pfeifer
Committed by
Sébastien Villemot
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
display_static_residuals.m: remove globals
parent
af274aec
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/display_static_residuals.m
+8
-22
8 additions, 22 deletions
matlab/display_static_residuals.m
preprocessor
+1
-1
1 addition, 1 deletion
preprocessor
with
9 additions
and
23 deletions
matlab/display_static_residuals.m
+
8
−
22
View file @
4598dba4
function
z
=
display_static_residuals
(
options_resid_
)
% function z = display_static_residuals(options_resid_)
function
z
=
display_static_residuals
(
M_
,
options_
,
oo_
,
options_resid_
)
% function z = display_static_residuals(
M_, options_, oo_,
options_resid_)
%
% Computes static residuals associated with the guess values.
%
% INPUTS
% M: [structure] storing the model information
% options: [structure] storing the options
% oo: [structure] storing the results
% options_resid_: options to resid
%
% OUTPUTS
...
...
@@ -29,11 +32,7 @@ function z = display_static_residuals(options_resid_)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
global
M_
options_
oo_
% Properly handle the case where no input argument is given, e.g. when
% writing “z = resid;” in a .mod file (hence not using the preprocessor syntax).
non_zero
=
nargin
>
0
&&
isfield
(
options_resid_
,
'non_zero'
)
&&
options_resid_
.
non_zero
;
non_zero
=
(
isfield
(
options_resid_
,
'non_zero'
)
&&
options_resid_
.
non_zero
);
tags
=
M_
.
equations_tags
;
istag
=
0
;
...
...
@@ -41,15 +40,6 @@ if ~isempty(tags)
istag
=
1
;
end
steady_state_old
=
oo_
.
steady_state
;
% Keep of a copy of M_.Sigma_e
Sigma_e
=
M_
.
Sigma_e
;
% Set M_.Sigma_e=0 (we evaluate the *deterministic* static model)
M_
.
Sigma_e
=
zeros
(
size
(
Sigma_e
));
info
=
0
;
if
any
(
imag
(
oo_
.
steady_state
))
imagrow
=
find
(
imag
(
oo_
.
steady_state
));
if
~
isempty
(
imagrow
)
...
...
@@ -83,8 +73,6 @@ else
disp_string
=
''
;
end
end
M_
.
Sigma_e
=
Sigma_e
;
% Display the non-zero residuals if no return value
if
nargout
==
0
...
...
@@ -129,5 +117,3 @@ if nargout == 0
end
skipline
(
2
)
end
\ No newline at end of file
oo_
.
steady_state
=
steady_state_old
;
This diff is collapsed.
Click to expand it.
preprocessor
@
ea347617
Compare
140c91e9
...
ea347617
Subproject commit
140c91e91188ee701d4a185d1ad771c23999f491
Subproject commit
ea3476179591eed472a14a35570660bd643cca1e
This diff is collapsed.
Click to expand it.
Johannes Pfeifer
@JohannesPfeifer
mentioned in merge request
!2176 (merged)
·
1 year ago
mentioned in merge request
!2176 (merged)
mentioned in merge request !2176
Toggle commit list
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