3437
|
1 ## Copyright (C) 1996 Auburn University. All rights reserved. |
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
7016
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
3437
|
9 ## |
7016
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
3437
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
7016
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
3437
|
18 |
6945
|
19 ## Undocumented internal function. |
|
20 |
3437
|
21 ## -*- texinfo -*- |
3500
|
22 ## @deftypefn {Function File} {} __sysdefstname__ (@var{n}, @var{nz}) |
3437
|
23 ## return default state names given @var{n}, @var{nz} |
|
24 ## |
|
25 ## used internally, minimal argument checking |
|
26 ## @end deftypefn |
|
27 |
3438
|
28 function stname = __sysdefstname__ (n, nz) |
3437
|
29 |
4771
|
30 stname = {}; |
4462
|
31 if (n > 0) |
3437
|
32 for ii = 1:n |
4771
|
33 stname{ii} = sprintf ("x_%d", ii); |
3437
|
34 endfor |
|
35 endif |
|
36 |
|
37 ## Set default names for discrete states |
4462
|
38 if (nz > 0) |
3437
|
39 for ii = (n+1):(n+nz) |
4771
|
40 stname{ii} = sprintf ("xd_%d", ii); |
3437
|
41 endfor |
|
42 endif |
|
43 |
|
44 endfunction |