Multiple Summation in matlab
Mostrar comentarios más antiguos
Hi, I want to do muliple summation in matlab for attached formula. Can you please guide me how to write matlab code for that.
Regards, Imran
2 comentarios
Walter Roberson
el 4 de Oct. de 2015
Does the term
Pc
ij
mean something different than
P * c
ij
Or is P a function or is Pc a single variable that is being subscripted?
The formula uses an explicit "*" before the x so it is not clear whether it is being inconsistent with its notation.
I am trying to figure out why it was not written as
Sigma Sigma Pc_ij Sigma x_ijs
since the part before the "*" is invarient in s. And if there is an implicit multiplication between P and c_ij then why was it not written as
P Sigma Sigma c_ij Sigma x_ijs
?
Respuestas (1)
Assuming Pc is an IxJ matrix and x an IxJxS matrix, then the sum is simply:
sum(sum(sum(bsxfun(@times, Pc, x))))
Categorías
Más información sobre Graphics Performance en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
