Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: i <= 0 ??
Date: Fri, 30 Oct 2009 22:20:19 +0000 (UTC)
Organization: Boeing
Lines: 15
Message-ID: <hcfor3$nia$1@fred.mathworks.com>
References: <hcfjrm$jcs$1@fred.mathworks.com> <s1JGm.37806$Tx1.13127@newsfe15.iad>
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 1256941219 24138 172.30.248.38 (30 Oct 2009 22:20:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 30 Oct 2009 22:20:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:581431


"Nasser M. Abbasi" <nma@12000.org> wrote in message <s1JGm.37806$Tx1.13127@newsfe15.iad>...
> 
> Hence Matlab answer for i<=0  should be 0 not 1. This is a bug.

No.

> Or Matlab uses some other logic to decide on these issues.

Yes, they use the rules they list in the doc for these operators. See Bruno's earlier post for the rules in the doc:

[... The operators <, >, <=, and >= use only the real part of their operands for the comparison. The operators == and ~= test real and imaginary parts. ..]

I don't see any discrepancy between this example and their documented rules. Now if you don't like their documented rules, that is another matter ...

James Tursa