Azzera filtri
Azzera filtri

How to calculate this formula?

1 visualizzazione (ultimi 30 giorni)
fede
fede il 5 Nov 2015
Risposto: Star Strider il 5 Nov 2015
I have a vector of weight w(1,n) and a vector of correlation p(n,1). How can calculate this formula?
  1 Commento
fede
fede il 5 Nov 2015
Sorry, I have the matrix of correlation, and not a vector.

Accedi per commentare.

Risposta accettata

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

Più risposte (0)

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

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

Start Hunting!

Translated by