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 |
|
6 ## under the terms of the GNU General Public License as published by the |
|
7 ## Free Software Foundation; either version 2, or (at your option) any |
|
8 ## later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but WITHOUT |
|
11 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 ## for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
|
16 ## along with Octave; see the file COPYING. If not, write to the Free |
|
17 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. |
|
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 ## @end deftypefn |
5053
|
41 ## |
3431
|
42 ## @seealso{Demo Programs: bddemo.m, frdemo.m, analdemo.m, |
|
43 ## moddmeo.m, rldemo.m} |
|
44 |
|
45 ## Author: David Clem |
|
46 ## Created: August 15, 1994 |
|
47 |
|
48 function DEMOcontrol () |
|
49 |
5016
|
50 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
|
51 |
|
52 while (1) |
|
53 |
|
54 clc (); |
|
55 |
|
56 k = 0; |
|
57 |
|
58 while (k > 8 || k < 1), |
|
59 k = menu ("Octave Controls System Toolbox Demo", |
|
60 "System representation", |
|
61 "Block diagram manipulations", |
|
62 "Frequency response functions", |
|
63 "State space analysis functions", |
|
64 "System model manipulations", |
|
65 "Root locus functions", |
|
66 "LQG/H2/Hinfinity functions", |
|
67 "End"); |
|
68 endwhile |
|
69 |
|
70 switch (k) |
|
71 case (1) sysrepdemo (); |
|
72 case (2) bddemo (); |
|
73 case (3) frdemo (); |
|
74 case (4) analdemo (); |
|
75 case (5) moddemo (); |
|
76 case (6) rldemo (); |
|
77 case (7) dgkfdemo (); |
|
78 case (8) return; |
|
79 endswitch |
|
80 |
|
81 endwhile |
|
82 |
|
83 endfunction |