source: iseven.m @ 2

Last change on this file since 2 was 2, checked in by tjniskan, 12 years ago
  • Imported first revision
File size: 444 bytes
Line 
1function isArgEven = iseven(inarg)
2% ISEVEN - Check if input is even
3%   
4%
5% Synopsis:
6%
7% Description:
8%
9% Examples:
10%
11% See also:
12%
13
14% Juha-Pekka Niskanen - <Juha-Pekka.Niskanen@uku.fi>  -  30.05.2006
15% Department of Biomedical NMR, University of Kuopio
16%
17% Last modified - 30.05.2006 - (J-P N)
18
19if nargin==0
20  error('Too few input arguments!')
21elseif ~isnumeric(inarg)
22  error('Numeric input is required!')
23end
24
25isArgEven=mod(inarg,2)==0;
Note: See TracBrowser for help on using the repository browser.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008