Path: news.mathworks.com!not-for-mail
From: "James Tursa" <aclassyguywithaknotac@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: generate a positive semi-definite matrices??
Date: Sun, 10 Feb 2008 08:38:01 +0000 (UTC)
Organization: Boeing
Lines: 36
Message-ID: <fomd59$3vm$1@fred.mathworks.com>
References: <b082bc0e-5d7a-4bcf-ab79-478ad6a820f9@e4g2000hsg.googlegroups.com> <0rqsq3tqr22j3e1h3emodegqmra5bd76rt@4ax.com>
Reply-To: "James Tursa" <aclassyguywithaknotac@hotmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1202632681 4086 172.30.248.38 (10 Feb 2008 08:38:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 10 Feb 2008 08:38:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:450412


James Tursa <aclassyguywithaknotac@hotmail.com> wrote in
message <0rqsq3tqr22j3e1h3emodegqmra5bd76rt@4ax.com>...
> On Sat, 9 Feb 2008 18:50:10 -0800 (PST), VijaKhara
> <VijaKhara@gmail.com> wrote:
> 
> >Hi all
> >
> >
> >I need to generate a 3x3 positive semi-definite matrix
but I don't
> >know what MATLAB function can do this?
> >Or is there any method to generate without try & check
method?
> >
> >Also, do you know what MATLAB function can be used to
check if a
> >matrix is a positive semi-definite matrix?
> >
> >Thank you
> 
> One way to generate a random positive semi-definite 3x3
matrix:
> 
> a = rand(3,3)
> ata = a'*a
> 
> To check, use the eig function to see that all of the
eigenvalues are
> non-negative
> 
> eig(ata)
> 
> James Tursa

Clarify: "ata" is the positive semi-definite matrix, not "a".