"Out of memory" error while inversing a symbolic matrix
3 views (last 30 days)
Show older comments
I made a code in matlab which requires the inversion of a symbolic matrix. This matrix was really big (60x60) and after several modifications in order to simplify it, I have a 14x14 matrix now, but even with this simplified version, I still receive the same error during the inversion of this matrix:
??? Error using ==> mupadmex
Error in MuPAD command: Out of memory;
during evaluation of 'myexpand'
I ran the code in a pc with 12Gb of RAM and 100Gb of virtual memory (SSD) during the whole weekend, and even that was unable to inverse my 14x14 symbolic matrix. Is it really impossible to inverse a symbolic matrix of this size?
Thanks in advance
3 Comments
karlosgk
on 26 Jun 2014
Thanks for replying. Maybe virtual memory is doesn't affect MaxPossibleArrayBytes. I also realized that the OS and matlab version are really important, so that all of memory is exploited. I am trying to cut down as much symbolic variables as possible, factorize lu the matrix and inverse by parts. We all know that symbolic toolbox is not the best feature.
Answers (1)
Roger Stafford
on 25 Jun 2014
Finding the inverse of a square matrix symbolically is a very different proposition from finding it numerically. Just suppose matlab used Cramer's Rule for example. With your 14-by-14 matrix it would obtain a hundred ninety seven different 14-by-14 determinants to evaluate symbolically. Each one could conceivably have 14! = 87,178,291,200 symbolic products to combine. Very probably there are more sophisticated methods to accomplish this symbolically, but this should give you some concept of the magnitude of taking a symbolic inverse for a large matrix. It is a formidable task and would certainly require a large amount of memory. Moreover, the symbolic answer to such an endeavor might very well exceed the number of characters in the Encyclopædia Britannica. What would you do with it?
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!