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



>> z = solve('3*x^4+7*x^3+7*x+3')
z =
   1/2*5^(1/2)-3/2
  -3/2-1/2*5^(1/2)
 1/3+2/3*i*2^(1/2)
 1/3-2/3*i*2^(1/2)
>> z = eval(z)
z =
  -0.3820          
  -2.6180          
   0.3333 + 0.9428i
   0.3333 - 0.9428i
>> z = z(imag(z)==0)
z =
   -0.3820
   -2.6180