[Octave 5.2.0 @ Ubuntu 20.04] Long duration of complex matrix inverse

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Octave 5.2.0 @ Ubuntu 20.04] Long duration of complex matrix inverse

KamilStawiarski
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: [Octave 5.2.0 @ Ubuntu 20.04] Long duration of complex matrix inverse

mmuetzel
Am 29. März 2020 um 12:22 Uhr schrieb "KamilStawiarski":

> Hi, I have a problem with complex matrix inverse. It tooks tooo much time -
> exactly after a few minutes it is still running.
> For example:
> R =[2.73777 + 0.00000i   1.37236 - 0.72174i   0.69303 - 0.14167i   0.63994 -
> 0.83864i  -0.25874 - 0.25550i  -0.82048 - 0.20511i; 1.37236 + 0.72174i  
> 2.69579 + 0.00000i   0.23759 - 0.30504i   1.29171 - 0.17148i  -0.15310 -
> 0.00730i  -0.25855 - 0.60625i; 0.69303 + 0.14167i   0.23759 + 0.30504i  
> 0.40401 + 0.00000i   0.20763 + 0.24430i   0.20110 - 0.03398i  -0.06607 -
> 0.18187i; 0.63994 + 0.83864i   1.29171 + 0.17148i   0.20763 - 0.24430i  
> 1.36263 + 0.00000i   0.37732 - 0.65585i  -0.35103 - 0.68330i; -0.25874 +
> 0.25550i  -0.15310 + 0.00730i   0.20110 + 0.03398i   0.37732 + 0.65585i  
> 0.86475 + 0.00000i   0.15397 - 0.44375i; -0.82048 + 0.20511i  -0.25855 +
> 0.60625i  -0.06607 + 0.18187i  -0.35103 + 0.68330i   0.15397 + 0.44375i  
> 0.51529 + 0.00000i];
>
> R^-1, inv(R) or even det(R) never ends. I hadn't this sort of problem at
> previous version (5.1.0 or 4.4.1).
>
> I also made some tests:
> >> inv(randn(5,5)+randn(5,5)*i)
> ans =
>
>   -2.425050 + 0.985107i  -2.252581 + 0.717247i   0.907427 + 0.038175i  
> 1.836315 - 0.164532i   1.118745 + 1.651210i
>   -0.441461 + 0.242339i  -0.362658 + 0.527868i   0.095278 - 0.101801i  
> 0.421793 - 0.354213i   0.653532 + 0.342560i
>   -0.822710 + 0.768548i  -0.839364 + 0.685658i   0.352782 - 0.286913i  
> 0.569430 - 0.484251i   0.885459 + 0.606097i
>   -1.085909 + 1.130584i  -1.502771 + 0.367119i   0.511804 - 0.073505i  
> 1.185076 - 0.471890i   0.831822 + 0.963687i
>    1.949569 - 2.571564i   2.639221 - 1.653823i  -1.182722 + 0.113535i
> -1.860883 + 1.649983i  -2.199696 - 1.906358i
>
> >> inv(randn(6,6)+randn(6,6)*i) <- still running.
>
> It seems that this occures with matrices larger than 5x5.
>
> Can somebody check occurrence of this at your copy?
>

I tested with a build from the current stable branch (6.0.1, hg id d597dc0a5f74) on Ubuntu 19.10.
Both calculations return almost immediately here:
>> tic; inv(randn(5,5)+randn(5,5)*i); toc
Elapsed time is 0.000129223 seconds.
>> tic; inv(randn(6,6)+randn(6,6)*i); toc
Elapsed time is 0.000251055 seconds.
>> version -hgid
ans = d597dc0a5f74

I'm not sure if this is Octave or a library that is slowing down the calculation in your case.

I had serious issues with pre-release versions of Ubuntu before. So at the moment, I don't want to upgrade my system to check what would happen here.
I hope this helps as some point of reference anyway.

Markus



Reply | Threaded
Open this post in threaded view
|

Re: [Octave 5.2.0 @ Ubuntu 20.04] Long duration of complex matrix inverse

KamilStawiarski
Thanks
It turns out that this problem occures also in manually compiled octave
4.4.1. It means that error comes from one of installed packages.
I'll try install Ubuntu 20.04 in virtualbox and check this at fresh
installation.



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: [Octave 5.2.0 @ Ubuntu 20.04] Long duration of complex matrix inverse

Doug Stewart-4


On Sun, Mar 29, 2020 at 7:39 AM KamilStawiarski <[hidden email]> wrote:
Thanks
It turns out that this problem occures also in manually compiled octave
4.4.1. It means that error comes from one of installed packages.
I'll try install Ubuntu 20.04 in virtualbox and check this at fresh
installation.



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



Ubuntu 18.04 and octave 5.2.0
 tic,inv(randn(6,6)+randn(6,6)*i) ,toc
ans =

 Columns 1 through 3:

  -0.00025458 + 0.00573682i   0.27446154 - 0.36608798i   0.28456015 + 0.00345123i
  -0.02760834 + 0.21434569i  -0.21261140 - 0.08065429i   0.28832795 - 0.23726909i
   0.26573899 - 0.03280374i   0.35208346 - 0.45807078i   0.15867216 - 0.15059749i
  -0.05720839 + 0.02623539i  -0.11396463 + 0.01431508i  -0.09422868 - 0.01999310i
  -0.13747606 + 0.03528087i   0.13991497 + 0.33603846i   0.17490894 - 0.00010424i
   0.05772397 + 0.07352437i   0.43947475 + 0.05767682i  -0.00914495 - 0.19564434i

 Columns 4 through 6:

   0.19321993 - 0.00389561i  -0.22185855 + 0.34759267i  -0.24228221 + 0.32230331i
  -0.02388983 + 0.01740626i  -0.09425709 + 0.06612079i   0.06894793 + 0.18158588i
   0.13899657 + 0.02920899i  -0.08774601 + 0.24028106i  -0.02701063 + 0.27439994i
   0.20429835 - 0.12165223i   0.15918181 - 0.10413616i   0.13709681 - 0.15020959i
   0.07077200 - 0.11193714i  -0.33344663 + 0.01027485i   0.06461853 - 0.26746488i
   0.01255307 + 0.07339730i  -0.26481172 + 0.02987499i  -0.21039622 + 0.11125255i

Elapsed time is 0.00355792 seconds.
--
DASCertificate for 206392