function H = entropy(F,mu) F = F(:); mu = mu(:); H = sum( F .* log(F+realmin) .* mu); return