Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Even/odd
Date: Thu, 23 Aug 2007 14:43:43 +0000 (UTC)
Organization: SAIC
Lines: 7
Message-ID: <fak6ev$t2k$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 1187880223 29780 172.30.248.38 (23 Aug 2007 14:43:43 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 23 Aug 2007 14:43:43 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 820271
Xref: news.mathworks.com comp.soft-sys.matlab:425214



How about even and odd functions built-in:

bool x;

x = even(num);
x = odd(num);