0

Hi

I want to compute Jordan normal form of big circular matrix in Matlab(i.e order of 365 x 365)

for an example a 4x4 circular matrix has the form :

A = [0 1 0 0 ; 0 0 1 0 ; 0 0 0 1 ;1 0 0 0]

When I call it for AA with dimention of 365 x 365:

[v,j] = eng.jordan(mtdb_G_time_cyc,nargout = 2)

I get this error :

Error using symengine (line 58)
Similarity matrix is too large.

Error in sym/mupadmexnout (line 875)
    out = mupadmex(fcn,args{:});

Error in sym/jordan (line 34)
    [Vsym,Jsym] = mupadmexnout('symobj::jordan',A,'All');

Error in double/jordan (line 25)
[V,J] = jordan(sym(A));

Traceback (most recent call last):
File "D:/MSC/Term1/BD/Paper_persentation/Code/big data GSP/main.py", line 
79, in <module>
[v,j] = eng.jordan(mtdb_G_time_cyc,nargout = 2)
File "C:\Users\Arian\Anaconda2\lib\site-
packages\matlab\engine\matlabengine.py", line 80, in __call__
_stderr).result()
File "C:\Users\Arian\Anaconda2\lib\site-
packages\matlab\engine\futureresult.py", line 109, in result
self._future,self._nargout, None, out=self._out, err=self._err)
matlab.engine.MatlabExecutionError: 
File C:\Program Files\MATLAB\R2014b\toolbox\symbolic\symbolic\symengine.p, 
line 58, in symengine

File C:\Program Files\MATLAB\R2014b\toolbox\symbolic\symbolic\@sym\sym.m, 
line 875, in sym.mupadmexnout

 File C:\Program 
 Files\MATLAB\R2014b\toolbox\symbolic\symbolic\@sym\jordan.m, line 34, in 
 jordan

 File C:\Program 
 Files\MATLAB\R2014b\toolbox\symbolic\symbolic\@double\jordan.m, line 25, in 
 jordan
 Similarity matrix is too large.

Actually, I call Matlab function through the python.

Is there any way which I can compute Jordan form ?

I would appreciate your solutions

4
  • Unfortunately, it looks like the Matlab implementation is symbolic. So I doubt that there is much you can do. Jan 29, 2018 at 10:32
  • For what its worth, the reason that Matlab probably doesnt have a non-symbolic version is that the Jordan decomposition is numerically unstable. The reason this is the case is that multiplicity is a very discontinuous operation. If I change the input matrix by some very small value, all of a sudden, one of the roots might have a multiplicity, meaning that one of the entries should switch from a 0 to a 1. From a numerical point of view, that means that I perturb the matrix by an infinitely small value, and the output should change by 1... That is a huge numerical problem. Jan 29, 2018 at 10:35
  • Why do you need to compute it through MATLAB? Did you try this solution using SymPy?
    – Dev-iL
    Jan 29, 2018 at 10:56
  • Yes, I checked that. But the problem exist as well
    – Captain
    Jan 30, 2018 at 5:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.