Problem with matrix logarithms, in the complex case

joao moreira joao.mrr1 at gmail.com
Mon Aug 25 16:40:29 CEST 2008


Hi all,

I have an issue with matrix logarithms, in the complex case. Consider
the following matrix :

A=[
    -0.01+0*%i 0.13+0*%i;
     0.00+0*%i 0.08+0*%i;
  ];

Coefficients are real, but I force them to be complex, hoping that
scilab will use a complex logarithm matrix function. But scilab says
"unable to diagonalize!"... I understand that as a real matrix, I
can't calculate its log, but as a complex matrix, why doesn't this
work ?

Using algorithms from Golub, van Loan, "Matrix Computations", I coded
a complex matrix log function, and found logm(A) = L where

L=[
    -4.6051702+3.1415927*%i  3.0036378-4.5378561*%i;
     0.0000000+0.0000000*%i -2.5257286+0.0000000*%i;
  ];

and it's easy to check that exp(log(A)) == log(exp(A)) == A.

I looked in the scilab source, and found that logm is actually a .sci
file that does
.........................
a=a+0*%i;   //Set complex
[s,u,bs]=bdiag(a);
  if maxi(bs)>1 then
    error('logm: unable to diagonalize!');return
  end
.........................

bdiag does block diagonalisation, finds a 2x2 block, and refuses to
continue !... Is this normal ? is there some reason for scilab not
calculating this ?

Maybe I'm missing something obvious, thanks for helping.

Joao

P.S. Maybe this is a question for the scilab developers, is there a
better forum for this ? Thx.


-- 
Joao Moreira (math student)
Paris, France
joao.mrr1 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20080825/f58c2769/attachment.htm>


More information about the users mailing list