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.
|
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
|