why do i recieve "Attempt to execute SCRIPT entropy as a function:

Hi,
When I execute entropy(x) it gives an error like this.
if true % code n = 100; X = zeros(n,8);
for idx = 1:n
X(idx,1) = mean(abs(D(idx,:)));
X(idx,2) = max(abs(D(idx,:)));
X(idx,3) = meanfreq(abs(D(idx,:)));
X(idx,4) = std(abs(D(idx,:)));
X(idx,5) = median(abs(D(idx,:)));
X(idx,6) = kurtosis(abs(D(idx,:)));
X(idx,7) = skewness(abs(D(idx,:)));
X(idx,8) = entropy(abs(D(idx,:)));
%X(idx,8) = minmax(abs(D(idx,:))); % hocaya sorulacak - degerler var bunlar ne anlam ifade ediyor.
end
end
Why I can't use "entropy(x)" command?
Could you help for this problem?

 採用された回答

Star Strider
Star Strider 2018 年 1 月 11 日

0 投票

‘Why I can't use "entropy(x)" command?’
Because you saved it as a script.
If you want to save it as a function, see the documentation on Function Basics (link) and save it as a function. Then you can call it from another script.

2 件のコメント

zeynelabidin sevgili
zeynelabidin sevgili 2018 年 1 月 11 日
Thank you so much
Star Strider
Star Strider 2018 年 1 月 11 日
As always, my pleasure.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by