Skip to content
Snippets Groups Projects
Verified Commit 52a57eaf authored by Willi Mutschler's avatar Willi Mutschler
Browse files

MoM: Remove duplicate check in gradient helper function

parent 0a880825
No related branches found
No related tags found
No related merge requests found
...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment