I have a vector of weight w(1,n) and a vector of correlation p(n,1). How can calculate this formula?

1 commentaire

fede
fede le 5 Nov 2015
Sorry, I have the matrix of correlation, and not a vector.

Connectez-vous pour commenter.

 Réponse acceptée

Star Strider
Star Strider le 5 Nov 2015

0 votes

See if this works:
wij = triu(bsxfun(@times, w, w'));
num = wij*p;
den = sum(wij(:));
pr = sum(num(:))/den);

Plus de réponses (0)

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!

Translated by