Info
此问题已关闭。 请重新打开它进行编辑或回答。
Performing matrix subtraction for huge data
1 次查看(过去 30 天)
显示 更早的评论
I have a matrix say A = [2,5,7]' and another matrix B = [2,7,9]', now i want to subtract B from A in such a way like each element of B will get subtracted from all elements of A, like c = A - B then c should be like (Expected outcome) = [0 3 5, -5 -2 0, -7 -4 -2]
Its like each element of B will get deducted from all elements of A and result will be stored in row wise in new matrix row wise.I dont want to use any loops but only vectorization.So i have used bsxfun but it is good for small matrix but if the dimension of A is 230600 * 1 and B is 1400000 * 1 then bsxfun show out of memory error so how to solve this issue without using loops??
1 个评论
Stephen23
2017-8-11
duplicate:
https://www.mathworks.com/matlabcentral/answers/352425-performing-matrix-subtraction-for-huge-data
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!