Fast computation of 2D summation

1 回表示 (過去 30 日間)
Xin
Xin 2018 年 4 月 5 日
編集済み: James Tursa 2018 年 4 月 5 日
Hello. I have two matrix, A and B and I want to compute the following 2D summation to get a 1D array T. Is it possible to use, e.g. convolution algorithm or other ones to acquire the solution? I try to use sum and it is a bit slow when A and B are large. Thanks a lot!

採用された回答

James Tursa
James Tursa 2018 年 4 月 5 日
編集済み: James Tursa 2018 年 4 月 5 日
T = reshape(B,size(B,1),[]) * A(:);

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by