Error in entropy function

3 visualizaciones (últimos 30 días)
Sadiq Akbar
Sadiq Akbar el 27 de Oct. de 2020
Comentada: Sadiq Akbar el 27 de Oct. de 2020
I use the entropy function given belwo for my data, but Matlab gives me an error.
e=entropy(x,'shannon')
Matlab gives me this error:
Error using entropy>ParseInputs (line 58)
Too many input arguments.
Error in entropy (line 38)
I = ParseInputs(varargin{:});

Respuestas (1)

Walter Roberson
Walter Roberson el 27 de Oct. de 2020
The entropy function only permits a single parameter.
You are probably thinking of the wentropy function, which does permit 'shannon' as a second parameter.
  2 comentarios
Sadiq Akbar
Sadiq Akbar el 27 de Oct. de 2020
Thank you dear Walter Roberson for your response.
Sadiq Akbar
Sadiq Akbar el 27 de Oct. de 2020
Dear Walter Roberson my code became now like this:
clear all
clc
load 2sn0_sorted;
fitness2sn0=one;
fitness2sn0=sort(fitness2sn0,'descend');
entropy1=wentropy(fitness2sn0,'shannon')
but it gives me a -ve value. Is it possible?

Iniciar sesión para comentar.

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by