comparison scripts/control/system/__sysdefstname__.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 4c8a2e4e0717
comparison
equal deleted inserted replaced
4770:ef5e598f099b 4771:b8105302cfe8
23 ## used internally, minimal argument checking 23 ## used internally, minimal argument checking
24 ## @end deftypefn 24 ## @end deftypefn
25 25
26 function stname = __sysdefstname__ (n, nz) 26 function stname = __sysdefstname__ (n, nz)
27 27
28 stname = list (); 28 stname = {};
29 if (n > 0) 29 if (n > 0)
30 for ii = 1:n 30 for ii = 1:n
31 stname(ii) = sprintf ("x_%d", ii); 31 stname{ii} = sprintf ("x_%d", ii);
32 endfor 32 endfor
33 endif 33 endif
34 34
35 ## Set default names for discrete states 35 ## Set default names for discrete states
36 if (nz > 0) 36 if (nz > 0)
37 for ii = (n+1):(n+nz) 37 for ii = (n+1):(n+nz)
38 stname(ii) = sprintf ("xd_%d", ii); 38 stname{ii} = sprintf ("xd_%d", ii);
39 endfor 39 endfor
40 endif 40 endif
41 41
42 endfunction 42 endfunction