From help-request at octave dot org Thu Apr 7 17:19:48 2005 Subject: Re: eignenvalue for nonsymmetric matrix From: A Scotte Hodel To: help at octave dot org Cc: A Scotte Hodel Date: Thu, 7 Apr 2005 17:18:30 -0500 Alternatively, use the schur decomposition (orthogonal, reveals eigenvalues) octave:1> stiff = [1,2,3,4;5,6,7,8;9,10,11,12;13,14,15,16] stiff = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 octave:2> schur(stiff) ans = 36.20937 -13.41641 -0.00000 0.00000 0.00000 -2.20937 -0.00000 0.00000 0.00000 0.00000 -0.00000 0.00000 0.00000 0.00000 0.00000 -0.00000 octave:3> format short e octave:4> schur(stiff) ans = 3.6209e+01 -1.3416e+01 -2.0056e-14 2.5742e-14 0.0000e+00 -2.2094e+00 -4.2663e-15 4.9731e-15 0.0000e+00 0.0000e+00 -2.3077e-15 2.5704e-15 0.0000e+00 0.0000e+00 0.0000e+00 -4.7866e-16 On Apr 7, 2005, at 3:05 PM, Vic Norton wrote: > svd gives you singular values, not eigen values. Generally you cannot > get an eigenvalue decomposition from a singular value decomposition. > The singular value decomposition is an orthogonal decomposition and > very robust. Distinct eigenvectors, on the other hand, may be almost > colinear. Orthogonality plays no roll here. The eigenvalue problem can > be very tricky, very sensitive to small perturbations. > > At 12:27 PM -0400 4/7/05, Przemek Klosowski wrote: >> a non-symmetric full matrix. Octave gives me the following error: >> error: dgeev failed to converge. The sample problem is below. >> >> octave:1> stiff = [1,2,3,4;5,6,7,8;9,10,11,12;13,14,15,16] >> ... >> octave:2> eig(stiff) >> error: dgeev failed to converge >> >> that is because the matrix you have picked up is degenerate, i.e. >> its rows are linearly dependent. In fact, it has only two independent >> rows, as you can see by executing rank(stiff). The eig() function only >> works for non-degenerate matrices; for degenerate ones you should >> use svd(). See http://www.cis.rit.edu/~ejipci/Reports/svd.pdf for >> details. > > > > ------------------------------------------------------------- > Octave is freely available under the terms of the GNU GPL. > > Octave's home on the web: http://www.octave.org > How to fund new projects: http://www.octave.org/funding.html > Subscription information: http://www.octave.org/archive.html > ------------------------------------------------------------- > > ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------