Make Octave error message more constructive and informative
See the discussion at http://savannah.gnu.org/bugs/?52569time-shift
parent
9be04a449f
commit
2e69ae22ff
|
@ -53,9 +53,9 @@ switch pshape(indx)
|
||||||
infbound = gaminv(truncprior,p6(indx),p7(indx))+p3(indx);
|
infbound = gaminv(truncprior,p6(indx),p7(indx))+p3(indx);
|
||||||
supbound = gaminv(1-truncprior,p6(indx),p7(indx))+p3(indx);
|
supbound = gaminv(1-truncprior,p6(indx),p7(indx))+p3(indx);
|
||||||
catch
|
catch
|
||||||
% Workaround for ticket #161
|
% Workaround for ticket #161, see http://savannah.gnu.org/bugs/?52569
|
||||||
if isoctave
|
if isoctave
|
||||||
error(['Due to a bug in Octave, you must choose other values for mean and/or variance of your prior on ' bayestopt_.name{indx} ', or use another shape'])
|
error(['Due to a computational limitation in Octave, the prior cannot be plotted. You must either use plot_priors=0 or choose other values for mean and/or variance of your prior on ' bayestopt_.name{indx} ', or use another shape'])
|
||||||
else
|
else
|
||||||
rethrow(lasterror)
|
rethrow(lasterror)
|
||||||
end
|
end
|
||||||
|
@ -72,9 +72,9 @@ switch pshape(indx)
|
||||||
infbound = 1/sqrt(gaminv(1-10*truncprior, p7(indx)/2, 2/p6(indx)))+p3(indx);
|
infbound = 1/sqrt(gaminv(1-10*truncprior, p7(indx)/2, 2/p6(indx)))+p3(indx);
|
||||||
supbound = 1/sqrt(gaminv(10*truncprior, p7(indx)/2, 2/p6(indx)))+p3(indx);
|
supbound = 1/sqrt(gaminv(10*truncprior, p7(indx)/2, 2/p6(indx)))+p3(indx);
|
||||||
catch
|
catch
|
||||||
% Workaround for ticket #161
|
% Workaround for ticket #161, see http://savannah.gnu.org/bugs/?52569
|
||||||
if isoctave
|
if isoctave
|
||||||
error(['Due to a bug in Octave, you must choose other values for mean and/or variance of your prior on ' bayestopt_.name{indx} ', or use another shape'])
|
error(['Due to a computational limitation in Octave, the prior cannot be plotted. You must either use plot_priors=0 or choose other values for mean and/or variance of your prior on ' bayestopt_.name{indx} ', or use another shape'])
|
||||||
else
|
else
|
||||||
rethrow(lasterror)
|
rethrow(lasterror)
|
||||||
end
|
end
|
||||||
|
@ -91,9 +91,9 @@ switch pshape(indx)
|
||||||
infbound = 1/(gaminv(1-10*truncprior, p7(indx)/2, 2/p6(indx)))+p3(indx);
|
infbound = 1/(gaminv(1-10*truncprior, p7(indx)/2, 2/p6(indx)))+p3(indx);
|
||||||
supbound = 1/(gaminv(10*truncprior, p7(indx)/2, 2/p6(indx)))+p3(indx);
|
supbound = 1/(gaminv(10*truncprior, p7(indx)/2, 2/p6(indx)))+p3(indx);
|
||||||
catch
|
catch
|
||||||
% Workaround for ticket #161
|
% Workaround for ticket #161, see http://savannah.gnu.org/bugs/?52569
|
||||||
if isoctave
|
if isoctave
|
||||||
error(['Due to a bug in Octave, you must choose other values for mean and/or variance of your prior on ' bayestopt_.name{indx} ', or use another shape'])
|
error(['Due to a computational limitation in Octave, the prior cannot be plotted. You must either use plot_priors=0 or choose other values for mean and/or variance of your prior on ' bayestopt_.name{indx} ', or use another shape'])
|
||||||
else
|
else
|
||||||
rethrow(lasterror)
|
rethrow(lasterror)
|
||||||
end
|
end
|
||||||
|
|
|
@ -92,9 +92,9 @@ for i=1:length(p6)
|
||||||
bounds.lb(i) = gaminv(prior_trunc,p6(i),p7(i))+p3(i);
|
bounds.lb(i) = gaminv(prior_trunc,p6(i),p7(i))+p3(i);
|
||||||
bounds.ub(i) = gaminv(1-prior_trunc,p6(i),p7(i))+p3(i);
|
bounds.ub(i) = gaminv(1-prior_trunc,p6(i),p7(i))+p3(i);
|
||||||
catch
|
catch
|
||||||
% Workaround for ticket #161
|
% Workaround for ticket #161, see http://savannah.gnu.org/bugs/?52569
|
||||||
if isoctave
|
if isoctave
|
||||||
error(['Due to a bug in Octave, you must choose other values for mean and/or variance of your prior on ' bayestopt.name{i} ', or use another shape'])
|
error(['Due to a computational limitation in Octave, the prior bounds cannot be computed. You must either use prior_trunc=0 or choose other values for mean and/or variance of your prior on ' bayestopt.name{i} ', or use another shape'])
|
||||||
else
|
else
|
||||||
rethrow(lasterror)
|
rethrow(lasterror)
|
||||||
end
|
end
|
||||||
|
@ -117,9 +117,9 @@ for i=1:length(p6)
|
||||||
bounds.lb(i) = 1/sqrt(gaminv(1-prior_trunc, p7(i)/2, 2/p6(i)))+p3(i);
|
bounds.lb(i) = 1/sqrt(gaminv(1-prior_trunc, p7(i)/2, 2/p6(i)))+p3(i);
|
||||||
bounds.ub(i) = 1/sqrt(gaminv(prior_trunc, p7(i)/2, 2/p6(i)))+p3(i);
|
bounds.ub(i) = 1/sqrt(gaminv(prior_trunc, p7(i)/2, 2/p6(i)))+p3(i);
|
||||||
catch
|
catch
|
||||||
% Workaround for ticket #161
|
% Workaround for ticket #161, see http://savannah.gnu.org/bugs/?52569
|
||||||
if isoctave
|
if isoctave
|
||||||
error(['Due to a bug in Octave, you must choose other values for mean and/or variance of your prior on ' bayestopt.name{i} ', or use another shape'])
|
error(['Due to a computational limitation in Octave, the prior bounds cannot be computed. You must either use prior_trunc=0 or choose other values for mean and/or variance of your prior on ' bayestopt.name{i} ', or use another shape'])
|
||||||
else
|
else
|
||||||
rethrow(lasterror)
|
rethrow(lasterror)
|
||||||
end
|
end
|
||||||
|
@ -142,9 +142,9 @@ for i=1:length(p6)
|
||||||
bounds.lb(i) = 1/gaminv(1-prior_trunc, p7(i)/2, 2/p6(i))+p3(i);
|
bounds.lb(i) = 1/gaminv(1-prior_trunc, p7(i)/2, 2/p6(i))+p3(i);
|
||||||
bounds.ub(i) = 1/gaminv(prior_trunc, p7(i)/2, 2/p6(i))+ p3(i);
|
bounds.ub(i) = 1/gaminv(prior_trunc, p7(i)/2, 2/p6(i))+ p3(i);
|
||||||
catch
|
catch
|
||||||
% Workaround for ticket #161
|
% Workaround for ticket #161, see http://savannah.gnu.org/bugs/?52569
|
||||||
if isoctave
|
if isoctave
|
||||||
error(['Due to a bug in Octave, you must choose other values for mean and/or variance of your prior on ' bayestopt.name{i} ', or use another shape'])
|
error(['Due to a computational limitation in Octave, the prior bounds cannot be computed. You must either use prior_trunc=0 or choose other values for mean and/or variance of your prior on ' bayestopt.name{i} ', or use another shape'])
|
||||||
else
|
else
|
||||||
rethrow(lasterror)
|
rethrow(lasterror)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue