Commit 08375e7b authored by Stéphane Adjemian's avatar Stéphane Adjemian

Fixed wrong ordering of the hyperparameters when walling the routine for...

Fixed wrong ordering of the hyperparameters when walling the routine for drawing random deviates from the Weibull distribution.
parent 472f6c4a
...@@ -166,10 +166,10 @@ if inverse_gamma_2_draws ...@@ -166,10 +166,10 @@ if inverse_gamma_2_draws
end end
if weibull_draws if weibull_draws
pdraw(weibull_index) = wblrnd(p6(weibull_index), p7(weibull_index)) + p3(weibull_index); pdraw(weibull_index) = wblrnd(p7(weibull_index), p6(weibull_index)) + p3(weibull_index);
out_of_bound = find( (pdraw(weibull_index)'>ub(weibull_index)) | (pdraw(weibull_index)'<lb(weibull_index))); out_of_bound = find( (pdraw(weibull_index)'>ub(weibull_index)) | (pdraw(weibull_index)'<lb(weibull_index)));
while ~isempty(out_of_bound), while ~isempty(out_of_bound),
pdraw(weibull_index(out_of_bound)) = wblrnd(p6(weibull_index(out_of_bound)),p7(weibull_index(out_of_bound)))+p3(weibull_index(out_of_bound)); pdraw(weibull_index(out_of_bound)) = wblrnd(p7(weibull_index(out_of_bound)),p6(weibull_index(out_of_bound)))+p3(weibull_index(out_of_bound));
out_of_bound = find( (pdraw(weibull_index)'>ub(weibull_index)) | (pdraw(weibull_index)'<lb(weibull_index))); out_of_bound = find( (pdraw(weibull_index)'>ub(weibull_index)) | (pdraw(weibull_index)'<lb(weibull_index)));
end end
end end
......
Markdown is supported
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