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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Stéphane Adjemian
dynare
Commits
52a57eaf
Verified
Commit
52a57eaf
authored
4 years ago
by
Willi Mutschler
Browse files
Options
Downloads
Patches
Plain Diff
MoM: Remove duplicate check in gradient helper function
parent
0a880825
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/method_of_moments/method_of_moments_objective_function_gradient_helper.m
+3
-10
3 additions, 10 deletions
...ts/method_of_moments_objective_function_gradient_helper.m
with
3 additions
and
10 deletions
matlab/method_of_moments/method_of_moments_objective_function_gradient_helper.m
+
3
−
10
View file @
52a57eaf
...
@@ -47,16 +47,9 @@ function [out1, out2] = method_of_moments_objective_function_gradient_helper(xpa
...
@@ -47,16 +47,9 @@ function [out1, out2] = method_of_moments_objective_function_gradient_helper(xpa
% =========================================================================
% =========================================================================
[
fval
,
info
,
exit_flag
,
junk1
,
junk2
,
oo_
,
M_
,
options_mom_
,
df
]
=
method_of_moments_objective_function
(
xparam1
,
Bounds
,
oo_
,
estim_params_
,
M_
,
options_mom_
);
[
fval
,
info
,
exit_flag
,
junk1
,
junk2
,
oo_
,
M_
,
options_mom_
,
df
]
=
method_of_moments_objective_function
(
xparam1
,
Bounds
,
oo_
,
estim_params_
,
M_
,
options_mom_
);
switch
options_mom_
.
current_optimizer
% mode_compute=1|3|13 require the gradient as second output argument
case
1
%fmincon
out1
=
fval
;
out1
=
fval
;
out2
=
df
;
out2
=
df
;
case
3
%fminunc
out1
=
fval
;
out2
=
df
;
case
13
%lsqnonlin
out1
=
fval
;
out2
=
df
;
otherwise
error
(
'Method of Moments: analytic_jacobian option is currently only supported by mode_compute 1, 3 and 13'
);
end
end
%main function end
end
%main function end
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