Multiple Summation in matlab

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

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
?
imran
imran 2015년 10월 6일
편집: imran 2015년 10월 6일
Hi Walter,
I have attached the image with notation details and parameters. I hope it clarifies. PC is a single variable called production cost for part 'i' in plant 'j'. It is mutiplied by x_ijs which is Quantity x of part i produced in plant j ready to be moved to subassembly s.

댓글을 달려면 로그인하십시오.

답변 (1개)

Guillaume
Guillaume 2015년 10월 6일
편집: Guillaume 2015년 10월 6일

2 개 추천

Assuming Pc is an IxJ matrix and x an IxJxS matrix, then the sum is simply:
sum(sum(sum(bsxfun(@times, Pc, x))))
edit: managed to mispell |bsxfun|!

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품

질문:

2015년 10월 4일

편집:

2015년 10월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by