From eac89fff176e0983c23bf9999c9afcca8b0a89a9 Mon Sep 17 00:00:00 2001 From: adehad <26027314+adehad@users.noreply.github.com> Date: Tue, 21 May 2019 15:12:21 +0100 Subject: [PATCH] circ_vmpdf large kappa stability fix https://github.com/circstat/circstat-matlab/issues/6 --- circ_vmpdf.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/circ_vmpdf.m b/circ_vmpdf.m index 7d158c3..11cc2ff 100644 --- a/circ_vmpdf.m +++ b/circ_vmpdf.m @@ -42,6 +42,5 @@ alpha = alpha(:); % evaluate pdf -C = 1/(2*pi*besseli(0,kappa)); -p = C * exp(kappa*cos(alpha-thetahat)); +p = exp( kappa*(cos(alpha-thetahat)-1) ) / (2*pi*besseli(0,kappa,1)); end