I have A=cell with 64 arrays each of 1X7 vector, and B= cell with 1806 arrays each of 7×3 matrices. I want to multiply each column of 7×3 matrix of cell B with transpose of A vectors i-e each column is multlipled element wise with 7×1 vector of cell A.for example
A{1}=[2 4 5 3 2 1 1]B{1}=[1 0 0; 0 0 1;1 0 0;0 0 1;0 1 0;1 0 0;0 1 0]R{1,1}=[2 0 00 0 45 0 00 0 30 2 01 0 00 1 0] and run the loop over all A and B such that the resultant is R{64,1806} cellI tried this: for m=1:numel(B) for i=1:numel(A) for k=1:3 %Bhas 3 columns
R=B{m}(:,k).*total_timereq_for_all_machines{i}'; end count=count+1 T{m,i}=R; end end
but this is giving me R as 7X1 vector while I want R as 7X3 matrix. how can I make corrections in this?
Best Answer