help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hess(rosser())


From: marco atzeri
Subject: Re: hess(rosser())
Date: Sun, 01 Jul 2012 08:44:49 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

On 7/1/2012 1:49 AM, Matyas Sustik wrote:
Does octave represent/mark symmetric matrices?  Observe the result of:
octave:1> hess(rosser())
ans =

    6.1100e+02  -4.9693e+02  -6.8294e-15  -6.2369e-15   3.7733e-15
3.1450e-14  -2.2097e-14  -5.0757e-14
   -4.9693e+02   4.0434e+02   1.8737e+01   6.7450e-14   2.9311e-15
4.1902e-14   6.3493e-15   1.4161e-14
    0.0000e+00   1.8737e+01   3.7049e+01   1.0113e+03   2.4212e-14
7.3035e-14  -1.1387e-13   2.2387e-14
    0.0000e+00   0.0000e+00   1.0113e+03  -5.2293e+01  -4.8701e-01
-6.3129e-14   9.4838e-14   9.6069e-15
    0.0000e+00   0.0000e+00   0.0000e+00  -4.8701e-01   1.5399e+01
-1.2437e+02   3.4570e-14  -5.4079e-15
    0.0000e+00   0.0000e+00   0.0000e+00   0.0000e+00  -1.2437e+02
1.0046e+03  -5.0581e-02   2.4911e-13
    0.0000e+00   0.0000e+00   0.0000e+00   0.0000e+00   0.0000e+00
-5.0581e-02   1.0199e+03  -1.4354e-08
    0.0000e+00   0.0000e+00   0.0000e+00   0.0000e+00   0.0000e+00
0.0000e+00  -1.4353e-08   1.0000e+03

The correct result should be symmetric, because rosser() is symmetric.
I implemented myself the orthogonal transformation to upper Hessenberg
form by calling the LAPACK dgehrd (general) and dsytrd (symmetric)
functions and it seems that the result matches what I get with dgehrd.
Therefore, I suspect that the problem lies with hess() not recognizing
(using) the fact that the argument is symmetric.

I do not know how symmetric matrices are handled in Octave.  Is it
checked every time?  Is there a mark on the matrix for efficiency? It
could also be the case that rosser() does not mark the matrix as
symmetric and so hess() uses the wrong algorithm.

-Matyas


help matrix_type

I do not see symmetric as specific type to be recognised or used

Marco






reply via email to

[Prev in Thread] Current Thread [Next in Thread]