Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: singular covariance matrix and svd
Date: Tue, 17 Feb 2009 10:33:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <gne3ot$cs9$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1234866781 13193 172.30.248.35 (17 Feb 2009 10:33:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 17 Feb 2009 10:33:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1612112
Xref: news.mathworks.com comp.soft-sys.matlab:518785


Hello to everybody.
Here is my problem:
I have to compute a covariance matrix S at each step of my algorithm.
This is done over an image matrix.
The image matrix values are normalized to [0,1].
Problems arise when I have to compute the determinant of S or its inverse.
Sometimes it happens that S is singular or close to singular so I get numerical instability. Should it happen, all the formulas following the computation of S will have a Nan or Inf value and the algorithm would not converge.
I've found out the svd Matlab built-in function and I was wondering if it might be helpful to solve my probem and how.

The general solution is to analyzie the covariance matrix before passing it to other formulas and modify the values that make it singular.
The question is: how?

Any help would be appreciated.
Thanks in advance.