matrix manipulation of a large diagonally symmetric matrix to reduce computational time

1 次查看(过去 30 天)
Hi there, Given a large square matrix (maybe up to 20k X 20k). I would like to reduce computational time for calculating special functions (elliptic integrals). When I image up this matrix it is diagonally symmetric as shown below. This diagonal symmetric behaviour is as expected I've shown 3 cases below.
What is the most efficient approach to reduce computational time for a matrix with this symmetry? Perhaps remove half the matrix then do computation then replicate using repmat? If this can be done it will greatly reduce the computational time. Any suggestions will be very helpful
Thanks
case 1
case 2
case 3
  7 个评论
Joseph
Joseph 2015-4-30
编辑:Joseph 2015-4-30
Thanks James, you are right I don't need the line that removes the zeros..
Actually my final result is thankfully only scalar so there is no need to reconstruct the matrix. I simply take the result and multiply the final scalar by 2 to account for the symmetry. I'll now try allocating using the method you suggested above. It maybe just easier for to pass you function .m file.
Joseph
Joseph 2015-4-30
I should add that my matrix size can range between 1x1 - 20k+20k+. Since I'm running the function through optimization.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by