From 887e44f2b0b62e012f5a62a3cd88355b0bcc8374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Tue, 8 Dec 2015 14:35:12 +0100 Subject: [PATCH] Cosmetic change. Removed loop. --- matlab/set_prior.m | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/matlab/set_prior.m b/matlab/set_prior.m index cbbd6cc72..3d3aa458f 100644 --- a/matlab/set_prior.m +++ b/matlab/set_prior.m @@ -192,14 +192,12 @@ end % truncation parameters by default for normal distribution k = find(bayestopt_.pshape == 3); k1 = find(isnan(bayestopt_.p3(k))); +k2 = find(isnan(bayestopt_.p4(k))); bayestopt_.p3(k(k1)) = -Inf*ones(length(k1),1); -k1 = find(isnan(bayestopt_.p4(k))); -bayestopt_.p4(k(k1)) = Inf*ones(length(k1),1); -for i=1:length(k) - bayestopt_.p6(k(i)) = bayestopt_.p1(k(i)) ; - bayestopt_.p7(k(i)) = bayestopt_.p2(k(i)) ; - bayestopt_.p5(k(i)) = bayestopt_.p1(k(i)) ; -end +bayestopt_.p4(k(k2)) = Inf*ones(length(k2),1); +bayestopt_.p6(k) = bayestopt_.p1(k); +bayestopt_.p7(k) = bayestopt_.p2(k); +bayestopt_.p5(k) = bayestopt_.p1(k); % inverse gamma distribution (type 1) k = find(bayestopt_.pshape == 4);