function [K] = HoopStats_R2K(R)
% "HoopStats_R2K"
% R01.01
% By Sam Berens (sam.berens@york.ac.uk).
%
% [K] = HoopStats_R2K(R)
%
% Converts a resultant (mean) vector length (R) into a von Mises
% concentration parameter (K);

%% Computation:
if (R < 0.85) && (R >= 0.53)
    K = -0.4 + (1.39*R) + (0.43/(1-R));
elseif R < 0.53
    K = (2*R) + (R^3) + (5*(R^5)/6);
else
    K = ((R^3) - (4*(R^2)) + (3*R))^-1;
end

return