How to calculate this formula?

1 次查看(过去 30 天)
I have a vector of weight w(1,n) and a vector of correlation p(n,1). How can calculate this formula?
  1 个评论
fede
fede 2015-11-5
Sorry, I have the matrix of correlation, and not a vector.

请先登录,再进行评论。

采纳的回答

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

更多回答(0 个)

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by