Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: non-complex elements
Date: Sat, 9 Feb 2008 04:57:01 +0000 (UTC)
Organization: Shaun Simmons (ID: 1-21CTFH)
Lines: 10
Message-ID: <fojbqt$e8m$1@fred.mathworks.com>
References: <foj731$a8d$1@fred.mathworks.com> <foj8ce$r3v$1@fred.mathworks.com> <foja4h$l8g$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1202533021 14614 172.30.248.38 (9 Feb 2008 04:57:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 9 Feb 2008 04:57:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 513223
Xref: news.mathworks.com comp.soft-sys.matlab:450289



>> x = roots([3 7 0 7 3])
x =
  -2.6180          
   0.3333 + 0.9428i
   0.3333 - 0.9428i
  -0.3820          
>> x(imag(x)==0)
ans =
   -2.6180
   -0.3820