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

1 Kommentar

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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Star Strider
Star Strider am 5 Nov. 2015

0 Stimmen

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

Weitere Antworten (0)

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by