More Octave compatibility fixes wrt catch
parent
ecdbc42319
commit
ea6ee19402
|
@ -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
|
[xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values
|
||||||
try
|
try
|
||||||
check_prior_bounds(xparam1,[bayestopt_.lb bayestopt_.ub],M_,estim_params_,options_,bayestopt_); %check whether calibration satisfies prior bounds
|
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.')
|
fprintf('Cannot use parameter values from calibration as they violate the prior bounds.')
|
||||||
rethrow(prior_bound_check_error);
|
rethrow(e);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -263,7 +263,8 @@ if fload==0,
|
||||||
if prepSA,
|
if prepSA,
|
||||||
try
|
try
|
||||||
T=zeros(size(dr_.ghx,1),size(dr_.ghx,2)+size(dr_.ghu,2),Nsam);
|
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),
|
if strcmp('MATLAB:nomem',ME.identifier),
|
||||||
prepSA=0;
|
prepSA=0;
|
||||||
disp('The model is too large for storing state space matrices ...')
|
disp('The model is too large for storing state space matrices ...')
|
||||||
|
|
Loading…
Reference in New Issue