🐛 make sure output arguments are set before return

kalman-mex
Johannes Pfeifer 2023-10-07 10:03:58 +02:00 committed by Sébastien Villemot
parent 8cc646fbf6
commit 2eb9475e0e
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 2 additions and 1 deletions

View File

@ -82,11 +82,12 @@ if ischar(func0)
end
[fval0,exit_flag,gg,hh]=penalty_objective_function(x,func0,penalty,varargin{:});
fval=fval0;
if ~exit_flag
igg=NaN(nx);
disp_verbose('Bad initial parameter.',Verbose)
return
end
fval=fval0;
% initialize mr_gstep and mr_hessian