Efficient submatrix product computation
古いコメントを表示
I am considering the discrete Smoluchowski equations and I need efficiently compute a matrix product.
For
,
and a given
I want to compute the product

I can easily do this by the following for loop
b = 0
for j = 1:ceil((i-1)/2)
b = b + K(j,i-j)*y(j)*y(i-j);
end
However, I want to know if there is a more efficient way of computing this product in a single line or less.
1 件のコメント
Chunru
2022 年 9 月 20 日
Have you tested that your above code works?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Parallel Computing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!