Commit ea6ee194 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

More Octave compatibility fixes wrt catch

parent ecdbc423
......@@ -96,9 +96,10 @@ if options_.use_calibration_initialization %set calibration as starting values
[xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values
try
check_prior_bounds(xparam1,[bayestopt_.lb bayestopt_.ub],M_,estim_params_,options_,bayestopt_); %check whether calibration satisfies prior bounds
catch prior_bound_check_error
catch
e = lasterror();
fprintf('Cannot use parameter values from calibration as they violate the prior bounds.')
rethrow(prior_bound_check_error);
rethrow(e);
end
end
......
......@@ -263,7 +263,8 @@ if fload==0,
if prepSA,
try
T=zeros(size(dr_.ghx,1),size(dr_.ghx,2)+size(dr_.ghu,2),Nsam);
catch ME
catch
ME = lasterror();
if strcmp('MATLAB:nomem',ME.identifier),
prepSA=0;
disp('The model is too large for storing state space matrices ...')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment