comparison scripts/control/is_sample.m @ 3381:69b167451491

[project @ 1999-12-15 20:48:10 by jwe]
author jwe
date Wed, 15 Dec 1999 20:48:45 +0000
parents 8dd4718801fd
children 10f21f7ccc7f
comparison
equal deleted inserted replaced
3380:f5edd74bdc6c 3381:69b167451491
1 # Copyright (C) 1996 Auburn University. All Rights Reserved 1 ## Copyright (C) 1996 Auburn University. All Rights Reserved
2 # 2 ##
3 # This file is part of Octave. 3 ## This file is part of Octave.
4 # 4 ##
5 # Octave is free software; you can redistribute it and/or modify it 5 ## Octave is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the 6 ## under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2, or (at your option) any 7 ## Free Software Foundation; either version 2, or (at your option) any
8 # later version. 8 ## later version.
9 # 9 ##
10 # Octave is distributed in the hope that it will be useful, but WITHOUT 10 ## Octave is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # for more details. 13 ## for more details.
14 # 14 ##
15 # You should have received a copy of the GNU General Public License 15 ## You should have received a copy of the GNU General Public License
16 # along with Octave; see the file COPYING. If not, write to the Free 16 ## along with Octave; see the file COPYING. If not, write to the Free
17 # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 17 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18 18
19 ## -*- texinfo -*- 19 ## -*- texinfo -*-
20 ## @deftypefn {Function File } { @var{retval} =} is_sample (@var{Ts}) 20 ## @deftypefn {Function File } { @var{retval} =} is_sample (@var{Ts})
21 ## return true if @var{Ts} is a legal sampling time 21 ## return true if @var{Ts} is a legal sampling time
22 ## (real,scalar, > 0) 22 ## (real,scalar, > 0)
23 ## @end deftypefn 23 ## @end deftypefn
24 24
25 function out = is_sample(Ts) 25 function out = is_sample(Ts)
26 # A. S. Hodel July 1995 26 ## A. S. Hodel July 1995
27 27
28 out = (is_scalar(Ts) && (Ts == abs(Ts)) && (Ts != 0) ); 28 out = (is_scalar(Ts) && (Ts == abs(Ts)) && (Ts != 0) );
29 29
30 endfunction 30 endfunction