From 53d18bd082993c2925795c52a629ff15e072a22f Mon Sep 17 00:00:00 2001 From: Romesh Abeysuriya Date: Mon, 2 Nov 2015 06:55:52 +1100 Subject: [PATCH] Proposed fix for #12 --- Published/Abeysuriya_2015/fit_cluster.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Published/Abeysuriya_2015/fit_cluster.m b/Published/Abeysuriya_2015/fit_cluster.m index 0261e44..f270b7e 100644 --- a/Published/Abeysuriya_2015/fit_cluster.m +++ b/Published/Abeysuriya_2015/fit_cluster.m @@ -68,6 +68,11 @@ fit_data.skip_fit(1:end) = 3; fit_data.target_f = d.f(:); fit_data.target_P = target_P; + model.prepare_for_fit(fit_data.target_f,fit_data.target_P,fit_data.fitted_params,fit_data.posterior_pp,fit_data.skip_fit); + fit_data(k).fitted_chisq = model.probability(fit_data.fitted_params); + fit_data(k).bic = NaN; + fit_data(k).aic = NaN; + fit_data(k).aicc = NaN; fprintf('Skipping %i due to bad data\n',j); else try