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)
Show older comments
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;
0 Comments
Answers (0)
See Also
Categories
Find more on Hypothesis Tests in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!