Azzera filtri
Azzera filtri

entropy of a signal

169 visualizzazioni (ultimi 30 giorni)
siddhartha chandel
siddhartha chandel il 27 Giu 2012
Hello every body . Please give me command for entropy calculation of a signal. How we can calculate using wentropy function in wavelet? Thanks in advance .
  2 Commenti
divya pawar
divya pawar il 23 Feb 2020
The entropy function given in Matlab is for image processing, so for other signals simply the formula
entropy= -sum(p*log2(p));
If probabilities are not known , you can use histogram to find them
h1=histogram(your_signal, 'Normalization', 'Probability');
h1.Values;
mamta p
mamta p il 21 Mag 2020
Modificato: mamta p il 21 Mag 2020
thank you Divya Pawar mam.

Accedi per commentare.

Risposte (2)

maria
maria il 25 Set 2012
Hi! For find the value of entropy for a signal 1-dimensional, can use:
p = hist(signal length);
entropy = -sum(p.*log2(p));
Do this solve your question?

dany katamba mpoyi
dany katamba mpoyi il 4 Mag 2022
I = randn(10000000,1);
p = hist(I,1000000);
% remove zero entries in p
p(p==0) = [];
% normalize p so that sum(p) is one.
p = p ./ numel(I);
Eg = -sum(p.*log(p));
I = randn(10000000,1);
p = hist(I,1000000);
% remove zero entries in p
p(p==0) = [];
% normalize p so that sum(p) is one.
p = p ./ numel(I);
Et = -sum(p.*log(p));
negE=Et-Eg

Categorie

Scopri di più su Get Started with Signal Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by