Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!news.aset.psu.edu!news.cse.psu.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: non-complex elements
Date: Sat, 9 Feb 2008 07:43:16 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 19
Message-ID: <fojlik$ptm$1@canopus.cc.umanitoba.ca>
References: <foj731$a8d$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1202542996 26550 192.70.172.160 (9 Feb 2008 07:43:16 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Sat, 9 Feb 2008 07:43:16 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:450302



In article <foj731$a8d$1@fred.mathworks.com>,
Steve  <steveDEL.bachmeierDEL@yahoo.com> wrote:
>When using the 'solve' command, I am getting a solution 
>vector where I am only interested in the non-complex 
>element.  How can I take only the real values of a vector?  

At the maple level, you would use rsolve. Placing assumptions
on your variables can also help, but even if all of your variables
are real, complex results can still be generated.

Selecting for Im(x) == 0 can be useful; though it would likely
be more useful to solve() for Im(x) = 0, as there might be
important conditions in which the imaginary term vanishes. The
presence of an imaginary term in a solution does not automatically
imply that the solution is non-real: such a solution might be
real (and distinct from the other solutions) under some conditions.
-- 
   "Beware of bugs in the above code; I have only proved it correct,
   not tried it."                                    -- Donald Knuth