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

6 vues (au cours des 30 derniers jours)
Joseph
Joseph le 23 Avr 2015
Commenté : Joseph le 30 Avr 2015
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 commentaires
Joseph
Joseph le 30 Avr 2015
Modifié(e) : Joseph le 30 Avr 2015
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 le 30 Avr 2015
I should add that my matrix size can range between 1x1 - 20k+20k+. Since I'm running the function through optimization.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by