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!