comparison scripts/control/system/is_signal_list.m @ 4771:b8105302cfe8

[project @ 2004-02-16 17:45:50 by jwe]
author jwe
date Mon, 16 Feb 2004 17:45:50 +0000
parents 3e48e60a1f8b
children ec8c33dcd1bf
comparison
equal deleted inserted replaced
4770:ef5e598f099b 4771:b8105302cfe8
1 ## Copyright (C) 1996, 1998, 2000 Auburn University. All rights reserved. 1 ## Copyright (C) 1996, 1998, 2000, 2004 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
21 ## Return true if @var{mylist} is a list of individual strings. 21 ## Return true if @var{mylist} is a list of individual strings.
22 ## @end deftypefn 22 ## @end deftypefn
23 23
24 function flg = is_signal_list (mylist) 24 function flg = is_signal_list (mylist)
25 25
26 flg = islist (mylist); 26 flg = iscell (mylist);
27 27 if(flg)
28 flg = (rows(mylist) == 1 | columns(mylist) == 1);
29 end
28 if (flg) 30 if (flg)
29 for ii = 1:length (mylist) 31 for ii = 1:length (mylist)
30 if (! (isstr (nth (mylist, ii)) && rows (nth (mylist,ii)) == 1)) 32 if (! (isstr (mylist{ii}) && rows (mylist{ii}) == 1))
31 flg = 0; 33 flg = 0;
32 endif 34 endif
33 endfor 35 endfor
34 endif 36 endif
35 37