Borrar filtros
Borrar filtros

How to calculate this formula?

1 visualización (últimos 30 días)
fede
fede el 5 de Nov. de 2015
Respondida: Star Strider el 5 de Nov. de 2015
I have a vector of weight w(1,n) and a vector of correlation p(n,1). How can calculate this formula?
  1 comentario
fede
fede el 5 de Nov. de 2015
Sorry, I have the matrix of correlation, and not a vector.

Iniciar sesión para comentar.

Respuesta aceptada

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

Más respuestas (0)

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by