matrix dividing
2 次查看(过去 30 天)
显示 更早的评论
If I have a big matrix like this: A=ones(1,450000). How can I divide it in 300 equal parts (1, 1500) and multiple these 300 parts (arrays) with a matrix with dimensions B=(1,300)?
Thank you...
0 个评论
回答(1 个)
Fangjun Jiang
2011-11-15
A=ones(1,450000);
NewA=reshape(A,300,[]);
C=B*NewA;
2 个评论
Fangjun Jiang
2011-11-15
Use this example to understand the row and column
Assume B=magic(3)
B(:,1) is the first column of B, B(:,2) is the second column,...
B(1,:) is the first row of B, B(2,:) is the second row, ...
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!