"Out of memory" error while inversing a symbolic matrix

3 views (last 30 days)
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
Marcelo Duarte
Marcelo Duarte on 25 Jun 2014
Edited: Marcelo Duarte on 25 Jun 2014
I don't think its worth upgrading RAM, karlos. As I said, i had over 100Gb of virtual memmory, which makes it extremely slow, but that was ok since I had a whole weekend, and still I got "out of memory" problems. I don't think upgrading your RAM can help.
karlosgk
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.

Sign in to comment.

Answers (1)

Roger Stafford
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?
  1 Comment
Marcelo Duarte
Marcelo Duarte on 25 Jun 2014
Well, its actually a tool that gives me the transfer function of a circuit described in a txt file (its not his bode plot, that several softwares like LTSpice do, but his equation in 's'), so my only symbolic variable is the laplace variable 's'.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!