bugGNU Octave - Bugs: bug #44849, expm() produces incorrect result

 
 

bug #44849: expm() produces incorrect result

Submitted by:  None
Submitted on:  Wed 15 Apr 2015 06:19:32 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Peter RoopnarineOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 15 Apr 2015 06:42:27 PM UTC, comment #3:

Ah your post just crossed mine :-)

OK I'll close with "invalid" (but remember to upgrade!)

Philip Nienhuis <philipnienhuis>
Project Member
Wed 15 Apr 2015 06:40:46 PM UTC, comment #2:

I'm afraid you made a typo.
On the page you mentioned, matrix A is defined as:

A = [0,-0.785398,0;0.785398,0,0;0,0,0];

rather than

A = [0,-0.785398,0;0.785398,0,0;0,0,1]; ## See last element!

With the proper A, both Octave-3.8.2 and Octave-4.0.0-rc4 do:

With that out of the way, how about the n=47 and n=111 sized matrices? Do you have examples with expected outcomes?

BTW Octave-3.6.4 is quite old. Better upgrade to 3.8.2 at least, or wait a month or so and you'll have 4.0.0.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 15 Apr 2015 06:40:23 PM UTC, comment #1:

Please cancel. There is an error in the B matrix as entered.

Anonymous
Wed 15 Apr 2015 06:19:32 PM UTC, original submission:

I ran expm(), the matrix exponentiation function on several large (n=47 and n=111) asymmetric square matrices and received unexpected results (numerically very large). I then compared the output of a much smaller matrix to that given by the Eigen C++ exp() function and the results differ. The Eigen results are, I believe, correct. Here is the Octave code:

Element (3,3) should be 1.
Here is a link to the Eigen page
http://eigen.tuxfamily.org/dox/unsupported/group__MatrixFunctions__Module.html#matrixbase_exp

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 15 Apr 2015 06:42:27 PM UTCphilipnienhuisStatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
    Wed 15 Apr 2015 06:40:46 PM UTCphilipnienhuisStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1