3431
|
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. |
3431
|
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. |
3431
|
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/>. |
3431
|
18 |
|
19 ## -*- texinfo -*- |
|
20 ## @deftypefn {Function File} {} DEMOcontrol |
|
21 ## Octave Control Systems Toolbox demo/tutorial program. The demo |
5016
|
22 ## allows the user to select among several categories of @acronym{OCST} function: |
3431
|
23 ## @example |
|
24 ## @group |
|
25 ## octave:1> DEMOcontrol |
|
26 ## O C T A V E C O N T R O L S Y S T E M S T O O L B O X |
|
27 ## Octave Controls System Toolbox Demo |
|
28 ## |
|
29 ## [ 1] System representation |
|
30 ## [ 2] Block diagram manipulations |
|
31 ## [ 3] Frequency response functions |
|
32 ## [ 4] State space analysis functions |
|
33 ## [ 5] Root locus functions |
|
34 ## [ 6] LQG/H2/Hinfinity functions |
|
35 ## [ 7] End |
|
36 ## @end group |
|
37 ## @end example |
|
38 ## Command examples are interactively run for users to observe the use |
5016
|
39 ## of @acronym{OCST} functions. |
3431
|
40 ## @seealso{Demo Programs: bddemo.m, frdemo.m, analdemo.m, |
|
41 ## moddmeo.m, rldemo.m} |
5642
|
42 ## @end deftypefn |
3431
|
43 |
|
44 ## Author: David Clem |
|
45 ## Created: August 15, 1994 |
|
46 |
|
47 function DEMOcontrol () |
|
48 |
5016
|
49 puts ("O C T A V E C O N T R O L S Y S T E M S T O O L B O X"); |
3431
|
50 |
|
51 while (1) |
|
52 |
|
53 clc (); |
|
54 |
|
55 k = 0; |
|
56 |
|
57 while (k > 8 || k < 1), |
|
58 k = menu ("Octave Controls System Toolbox Demo", |
|
59 "System representation", |
|
60 "Block diagram manipulations", |
|
61 "Frequency response functions", |
|
62 "State space analysis functions", |
|
63 "System model manipulations", |
|
64 "Root locus functions", |
|
65 "LQG/H2/Hinfinity functions", |
|
66 "End"); |
|
67 endwhile |
|
68 |
|
69 switch (k) |
|
70 case (1) sysrepdemo (); |
|
71 case (2) bddemo (); |
|
72 case (3) frdemo (); |
|
73 case (4) analdemo (); |
|
74 case (5) moddemo (); |
|
75 case (6) rldemo (); |
|
76 case (7) dgkfdemo (); |
|
77 case (8) return; |
|
78 endswitch |
|
79 |
|
80 endwhile |
|
81 |
|
82 endfunction |