Maniputalting data to input in a function.
Afficher commentaires plus anciens
I have a function for entropy. I need to test data in the form of table (19 rows and 1359 columns). I need to know in what form is the input in the following function supposed to be. And how do i manipulate my input data(in the form of a table) to use in this function.
The following is the function :
function [e]=fpermentr(vstup)
y=vstup;
sd = std(y);
y = (y-mean(y))/sd;
ly = length(y);
ord = 4;
permlist = perms(1:ord);
c(1:length(permlist))=0;
for j=1:ly-ord
[a,iv]=sort(y(j:j+ord-1));
for jj=1:length(permlist)
if (abs(permlist(jj,:)-iv))==0
c(jj) = c(jj) + 1 ;
end
end
end
p = max(1/ly,c/(ly-ord));
e = -sum(p .* log(p))/(ord-1);
end
[EDITED] Also in which form will i get the output?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Import and Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!