Multiplication of matrix element of different size matrix

1 回表示 (過去 30 日間)
Aryama Mandal
Aryama Mandal 2015 年 6 月 4 日
編集済み: James Tursa 2015 年 6 月 4 日
I want to perform this
m(l,j)= sum of (i=1 to M)(x(i,l)*w(i,j))/ sum(i=1 to M)x(i,l)
where ,x will get from this code
v=[1 0;0 1;1 0]
rowperms = perms(1:size(v, 1));
x= cellfun(@(rowperm) v(rowperm, :), num2cell(rowperms, 2), 'UniformOutput', false);
w is 3*5 matrix. How to perform it? what I have done is
for l1=1:ll
for j1=1:jj
summ1=0.0;
sumx1=0.0;
for i1=1:ii
m1(l1,j1)= (x(i1,l1))*(w(i1,j1))%total load of cell l induced by part j(for a fixed value of l and j and differerent value of i multiplying x and w)
summ1=summ1+m1(l1,j1)
x1(i1,l1)= x(i1,l1)% no of machine in cell l
sumx1=sumx1+x1(i1,l1)
end
m(l1,j1)=summ1/sumx1% avarege cell load
end
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by