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{:});

답변 (1개)

Walter Roberson
Walter Roberson 2020년 10월 27일

0 개 추천

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

Sadiq Akbar
Sadiq Akbar 2020년 10월 27일
Thank you dear Walter Roberson for your response.
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?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2020년 10월 27일

댓글:

2020년 10월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by