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
926a5438
Verified
Commit
926a5438
authored
4 years ago
by
Willi Mutschler
Browse files
Options
Downloads
Patches
Plain Diff
wrong setting of small values to zeros in identification
parent
db01f543
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1733
Identification bug fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/pruned_state_space_system.m
+5
-4
5 additions, 4 deletions
matlab/pruned_state_space_system.m
with
5 additions
and
4 deletions
matlab/pruned_state_space_system.m
+
5
−
4
View file @
926a5438
...
...
@@ -1048,16 +1048,17 @@ if compute_derivs
end
for
jpV
=
1
:
totparam_nbr
if
order
<
3
dVar_y
(
stationary_vars
,
stationary_vars
,
jpV
)
=
dC
(
stationary_vars
,:,
jpV
)
*
Var_z
*
C
(
stationary_vars
,:)
' + C(stationary_vars,:)*dVar_z(:,:,jpV)*C(stationary_vars,:)'
+
C
(
stationary_vars
,:)
*
Var_z
*
dC
(
stationary_vars
,:,
jpV
)
'
...
dVar_y
_tmp
=
dC
(
stationary_vars
,:,
jpV
)
*
Var_z
*
C
(
stationary_vars
,:)
' + C(stationary_vars,:)*dVar_z(:,:,jpV)*C(stationary_vars,:)'
+
C
(
stationary_vars
,:)
*
Var_z
*
dC
(
stationary_vars
,:,
jpV
)
'
...
+
dD
(
stationary_vars
,:,
jpV
)
*
Varinov
*
D
(
stationary_vars
,:)
' + D(stationary_vars,:)*dVarinov(:,:,jpV)*D(stationary_vars,:)'
+
D
(
stationary_vars
,:)
*
Varinov
*
dD
(
stationary_vars
,:,
jpV
)
'
;
else
dVar_y
(
stationary_vars
,
stationary_vars
,
jpV
)
=
dC
(
stationary_vars
,:,
jpV
)
*
Var_z
*
C
(
stationary_vars
,:)
' + C(stationary_vars,:)*dVar_z(:,:,jpV)*C(stationary_vars,:)'
+
C
(
stationary_vars
,:)
*
Var_z
*
dC
(
stationary_vars
,:,
jpV
)
'
...
dVar_y
_tmp
=
dC
(
stationary_vars
,:,
jpV
)
*
Var_z
*
C
(
stationary_vars
,:)
' + C(stationary_vars,:)*dVar_z(:,:,jpV)*C(stationary_vars,:)'
+
C
(
stationary_vars
,:)
*
Var_z
*
dC
(
stationary_vars
,:,
jpV
)
'
...
+
dD
(
stationary_vars
,:,
jpV
)
*
E_inovzlag1
*
C
(
stationary_vars
,:)
' + D(stationary_vars,:)*dE_inovzlag1(:,:,jpV)*C(stationary_vars,:)'
+
D
(
stationary_vars
,:)
*
E_inovzlag1
*
dC
(
stationary_vars
,:,
jpV
)
'
...
+
dC
(
stationary_vars
,:,
jpV
)
*
transpose
(
E_inovzlag1
)
*
D
(
stationary_vars
,:)
' + C(stationary_vars,:)*transpose(dE_inovzlag1(:,:,jpV))*D(stationary_vars,:)'
+
C
(
stationary_vars
,:)
*
transpose
(
E_inovzlag1
)
*
dD
(
stationary_vars
,:,
jpV
)
'
...
+
dD
(
stationary_vars
,:,
jpV
)
*
Varinov
*
D
(
stationary_vars
,:)
' + D(stationary_vars,:)*dVarinov(:,:,jpV)*D(stationary_vars,:)'
+
D
(
stationary_vars
,:)
*
Varinov
*
dD
(
stationary_vars
,:,
jpV
)
'
;
end
[
indzerosrow
,
indzeroscol
]
=
find
(
abs
(
dVar_y
(:,:,
jpV
))
<
1e-12
);
%find values that are numerical zero
dVar_y
(
indzerosrow
,
indzeroscol
,
jpV
)
=
0
;
indzeros
=
find
(
abs
(
dVar_y_tmp
)
<
1e-12
);
%find values that are numerical zero
dVar_y_tmp
(
indzeros
)
=
0
;
dVar_y
(
stationary_vars
,
stationary_vars
,
jpV
)
=
dVar_y_tmp
;
if
useautocorr
%is this correct?[@wmutschl]
dsy
=
1
/
2.
/
sy
.*
diag
(
dVar_y
(:,:,
jpV
));
...
...
This diff is collapsed.
Click to expand it.
Willi Mutschler
@wmutschl
mentioned in commit
1c9024d1
·
4 years ago
mentioned in commit
1c9024d1
mentioned in commit 1c9024d1f968f510ba78eb6b464091671e785a69
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