Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!t11g2000prh.googlegroups.com!not-for-mail
From: Nathan <ngreco32@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: i <= 0 ??
Date: Fri, 30 Oct 2009 14:05:44 -0700 (PDT)
Organization: http://groups.google.com
Lines: 27
Message-ID: <dc1ce7a9-e8a9-46d8-93e0-441dad6f810c@t11g2000prh.googlegroups.com>
References: <hcfjrm$jcs$1@fred.mathworks.com>
NNTP-Posting-Host: 198.206.219.34
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256936745 15585 127.0.0.1 (30 Oct 2009 21:05:45 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 30 Oct 2009 21:05:45 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: t11g2000prh.googlegroups.com; posting-host=198.206.219.34; 
	posting-account=_KeVcAoAAAB7j3xn35ujaQ0BoQhuzwJP
User-Agent: G2/1.0
X-HTTP-Via: 1.1 wwwproxy-son-ca-02.ca.sandia.gov:80 (squid/2.5.STABLE14)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:581412


On Oct 30, 1:55 pm, "Muhammad " <muh...@shaw.ca> wrote:
> Complex number are ordered in matlab. For the imaginary unit, i, for example, I get
> ? disp(i < 0 | i == 0)
> ans =
>      0
> This may be consistent behavior. But it is certainly inconsistent with the following result:
> ? disp (i <= 0)
> ans =
>      1

That's interesting:
>> disp(i>0)
     0
>> disp(i>=0)
     1
>> disp(i==0)
     0
>> disp(i<=0)
     1
>> disp(i<0)
     0

But then again, why would you compare i to zero anyways?

-Nathan