How can I speed my function?

1 vue (au cours des 30 derniers jours)
zaier xiang
zaier xiang le 22 Avr 2017
Modifié(e) : zaier xiang le 27 Avr 2017
the function is used to compute hoeffdingsD measure,but the performance of my function is poor. when i use it in my code ,it usually cost several days.who can help me ,or compile it .

Réponse acceptée

Andrew Newell
Andrew Newell le 22 Avr 2017
One source of delays can be repmat. This can be replaced by a suitable choice of index, as in the following:
r = R(i,:);
r = r(ones(N,1),:);
See Matlab Indexing and Repmat Replacement for a discussion of this issue.
That said, it may be too much to expect a really fast implementation of this algorithm, judging by this discussion of the algorithm.
  1 commentaire
zaier xiang
zaier xiang le 24 Avr 2017
thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!