[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## matrix close to singular

**From**: |
Gerald Marewo |

**Subject**: |
matrix close to singular |

**Date**: |
Thu, 16 Nov 2000 17:24:15 +0200 |

**User-agent**: |
Mutt/1.2.5i |

hi all.
i am working on a problem which involves the generalized eigenvalue
problem:
given any two square matrices A and B, find matrices X and
D that satisfy the following equation:
A*X = B*X*D
where D is a diagonal matrix of generalized eigenvalues and
X is a matrix whose columns are the generalized
eigenvectors.
on the octave prompt if i type the following
[X,D] = geig(A,B)
where geig.m is a user-defined function (below) that uses the qz
function
function [V,D] = geig(A,B)
[AA, BB, Q, Z, V, W, lambda] = qz (A, B);
D = diag(lambda);
endfunction
this should be equivalent to the matlab `eig' function.
for certain matrices i get the following warning:
warning: inverse: matrix singular to machine precision, rcond =
3.93295e-19
in matlab i get a similar message:
matrix is close to singular or badly scaled. results may be
inaccurate. rcond = 5.678709e-018
is there a way of going round the problem of getting inaccurate
results. if there is a way of rescaling the matrix appropriately
please let me know?
any help will be greatly appreciated.
--
Gerald Marewo <address@hidden> using linux S.u.S.E;
X-window system:-) a graphical user interface for unix-like os's;
image viewing programs: gimp, xli, xdvi, gs, gv, xv, xview, xwud,....
window magagers: kde, gnome, wmaker, enlightenment, fvwm, ctwm, icewm
-------------------------------------------------------------
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
-------------------------------------------------------------

**matrix close to singular**,
*Gerald Marewo* **<=**