annotate scripts/control/freqchkw.m @ 3425:8625164a0a39

[project @ 2000-01-13 08:31:37 by jwe]
author jwe
date Thu, 13 Jan 2000 08:32:16 +0000
parents 9610d364e444
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3397
1a8e2c0d627a [project @ 1999-12-18 03:02:18 by jwe]
jwe
parents: 3385
diff changeset
1 ## Copyright (C) 1996 Auburn University. All rights reserved.
3381
69b167451491 [project @ 1999-12-15 20:48:10 by jwe]
jwe
parents: 3346
diff changeset
2 ##
3425
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
3 ## This file is part of Octave.
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
4 ##
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
6 ## under the terms of the GNU General Public License as published by the
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
7 ## Free Software Foundation; either version 2, or (at your option) any
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
8 ## later version.
3381
69b167451491 [project @ 1999-12-15 20:48:10 by jwe]
jwe
parents: 3346
diff changeset
9 ##
3425
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but WITHOUT
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
11 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
12 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3381
69b167451491 [project @ 1999-12-15 20:48:10 by jwe]
jwe
parents: 3346
diff changeset
13 ## for more details.
3425
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
14 ##
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
15 ## You should have received a copy of the GNU General Public License
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
16 ## along with Octave; see the file COPYING. If not, write to the Free
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
17 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
3402
9610d364e444 [project @ 2000-01-05 04:36:38 by jwe]
jwe
parents: 3398
diff changeset
18
3346
8dd4718801fd [project @ 1999-11-09 18:18:12 by jwe]
jwe
parents: 3284
diff changeset
19 ## -*- texinfo -*-
3425
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
20 ## @deftypefn {Function File} {@var{retval} =} freqchkw (@var{w})
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
21 ## Used by @code{freqresp} to check that input frequency vector @var{w}
8625164a0a39 [project @ 2000-01-13 08:31:37 by jwe]
jwe
parents: 3402
diff changeset
22 ## is valid.
3346
8dd4718801fd [project @ 1999-11-09 18:18:12 by jwe]
jwe
parents: 3284
diff changeset
23 ## Returns boolean value.
8dd4718801fd [project @ 1999-11-09 18:18:12 by jwe]
jwe
parents: 3284
diff changeset
24 ## @end deftypefn
8dd4718801fd [project @ 1999-11-09 18:18:12 by jwe]
jwe
parents: 3284
diff changeset
25
3398
0f515bc98460 [project @ 1999-12-18 04:21:28 by jwe]
jwe
parents: 3397
diff changeset
26 ## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
0f515bc98460 [project @ 1999-12-18 04:21:28 by jwe]
jwe
parents: 3397
diff changeset
27 ## Created: July 1996
3381
69b167451491 [project @ 1999-12-15 20:48:10 by jwe]
jwe
parents: 3346
diff changeset
28
3398
0f515bc98460 [project @ 1999-12-18 04:21:28 by jwe]
jwe
parents: 3397
diff changeset
29 function USEW = freqchkw (w)
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
30
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
31 if(isempty(w))
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
32 USEW = 0;
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
33 elseif(!is_vector(w))
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
34 error(["w (",num2str(rows(w)),"x",num2str(columns(w)), ...
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
35 "): must be [], a vector or a scalar"]);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
36 elseif( (max(abs(imag(w))) != 0) && (min(real(w)) <= 0) )
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
37 error("w must have real positive entries");
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
38 else
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
39 w = sort(w);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
40 USEW = 1; # vector provided (check values later)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
41 endif
3397
1a8e2c0d627a [project @ 1999-12-18 03:02:18 by jwe]
jwe
parents: 3385
diff changeset
42
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents:
diff changeset
43 endfunction