Multiply each column of cell array by column vector
显示 更早的评论
I have a 10x1 cell of separate events with each array having a size 384(time) x 5328(pixel). I want to multiply each column in each cell array by a column vector (C = 384x1). I have tried this code but it's not giving me the correct answer.
A = cell(size(B));
for jj = 1:10
A{jj,1} = B{jj,1},[],1 .* C;
end
Thanks
1 个评论
Stephen23
2015-10-26
related to this question:
采纳的回答
更多回答(1 个)
Andrei Bobrov
2015-10-26
A = cell(size(B));
for jj = 1:10
A{jj} = bsxfun(@times,B{jj},C);
end
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!