function prob = pr(d)
% pr this function returns the probability of the duration d in the coding
% state 3
% minDg = 30;     % the minimum duration for the gamma distribution
% maxDg = 7155;   % the maximum duration in the gamma distributed duration states
% Nc = 0.0017;
% Dc = 300;

minDg = 2;
maxDg = 20;
Dc = 7;
Nc = 0.1277;

D = maxDg;
if d < minDg || d > maxDg
    prob = 0;
else
    prob = Nc * (d/Dc)^2 * exp(-d/Dc);
end

end
