3d matrix multiplication with reduce computation time
古いコメントを表示
Hello Everyone
I have two 3D-matrices A(M,N,I) and B(M,N,I) with complex numbers. Values of M,N and I are large say in the range 500-5000. An easy way to do matrix multiplication is to use for loop for I, but it hugely slows down my rest of the code because I have to do this multiplication thousand of time.
I have been searching the answer in MATLAB answer since two days. The recommended solutions are using following MEX files
3. ' mtimesx ': This is the only solution I found which fits for my situation. It's really fast with real numbers but when I use the complex number the estimated time is greater than simply using for loop.
Can anyone here please recommend the solution in which I can do multiplication of two complex 3D-matrices without using the for the loop but reduces computation time?
I am really looking for a positive response.
Regards abi
3 件のコメント
James Tursa
2017 年 8 月 28 日
編集済み: James Tursa
2017 年 8 月 28 日
Can you post the m-code equivalent of what you are doing and the exact sized involved? Also, what MATLAB version and platform are you using? For the size ranges you mention above, the only speedup to be expected is likely to be the 2D slice copies that can be avoided in a mex routine, but maybe newer versions of MATLAB are smart enough to not make these copies.
Abi Waqas
2017 年 8 月 29 日
Jan
2017 年 8 月 29 日
Just a note: See the preceding question: https://www.mathworks.com/matlabcentral/answers/353797-can-i-reduce-computation-time-for-the-matrix-computation-sparse-matrices
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Linear Algebra についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!