Hello there, I have this function below and by Using it, i need to obtain the entropy of a Gaussian continuous random variable with mean µ=2 and a variance of σ=3.Can you help me with this problem?

1 view (last 30 days)
function h=entropy_continuous(x,fx) if max(diff(x)) > min(diff(x))*(1.01) error('x is not equally distributed.'); end; dx=x(2)-x(1); if sum(fx)*dx<0.95 sum(fx)*dx>1.05 error('distribution does not have unit area.'); end; h=-sum(fx.*log2(fx))*dx;

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!