annotate scripts/control/base/DEMOcontrol.m @ 5053:c08cb1098afc

[project @ 2004-10-19 23:10:54 by jwe]
author jwe
date Tue, 19 Oct 2004 23:10:55 +0000
parents bdbee5282954
children 4c8a2e4e0717
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3431
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
1 ## Copyright (C) 1996 Auburn University. All rights reserved.
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
2 ##
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
4 ##
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by the
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
7 ## Free Software Foundation; either version 2, or (at your option) any
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
8 ## later version.
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
9 ##
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but WITHOUT
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
11 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
12 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
13 ## for more details.
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
14 ##
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, write to the Free
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
17 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
18
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
20 ## @deftypefn {Function File} {} DEMOcontrol
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
21 ## Octave Control Systems Toolbox demo/tutorial program. The demo
5016
bdbee5282954 [project @ 2004-09-22 02:50:35 by jwe]
jwe
parents: 3431
diff changeset
22 ## allows the user to select among several categories of @acronym{OCST} function:
3431
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
23 ## @example
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
24 ## @group
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
25 ## octave:1> DEMOcontrol
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
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
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
27 ## Octave Controls System Toolbox Demo
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
28 ##
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
29 ## [ 1] System representation
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
30 ## [ 2] Block diagram manipulations
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
31 ## [ 3] Frequency response functions
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
32 ## [ 4] State space analysis functions
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
33 ## [ 5] Root locus functions
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
34 ## [ 6] LQG/H2/Hinfinity functions
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
35 ## [ 7] End
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
36 ## @end group
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
37 ## @end example
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
38 ## Command examples are interactively run for users to observe the use
5016
bdbee5282954 [project @ 2004-09-22 02:50:35 by jwe]
jwe
parents: 3431
diff changeset
39 ## of @acronym{OCST} functions.
3431
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
40 ## @end deftypefn
5053
c08cb1098afc [project @ 2004-10-19 23:10:54 by jwe]
jwe
parents: 5016
diff changeset
41 ##
3431
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
42 ## @seealso{Demo Programs: bddemo.m, frdemo.m, analdemo.m,
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
43 ## moddmeo.m, rldemo.m}
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
44
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
45 ## Author: David Clem
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
46 ## Created: August 15, 1994
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
47
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
48 function DEMOcontrol ()
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
49
5016
bdbee5282954 [project @ 2004-09-22 02:50:35 by jwe]
jwe
parents: 3431
diff changeset
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
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
51
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
52 while (1)
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
53
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
54 clc ();
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
55
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
56 k = 0;
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
57
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
58 while (k > 8 || k < 1),
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
59 k = menu ("Octave Controls System Toolbox Demo",
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
60 "System representation",
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
61 "Block diagram manipulations",
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
62 "Frequency response functions",
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
63 "State space analysis functions",
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
64 "System model manipulations",
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
65 "Root locus functions",
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
66 "LQG/H2/Hinfinity functions",
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
67 "End");
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
68 endwhile
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
69
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
70 switch (k)
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
71 case (1) sysrepdemo ();
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
72 case (2) bddemo ();
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
73 case (3) frdemo ();
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
74 case (4) analdemo ();
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
75 case (5) moddemo ();
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
76 case (6) rldemo ();
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
77 case (7) dgkfdemo ();
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
78 case (8) return;
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
79 endswitch
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
80
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
81 endwhile
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
82
99ab64f4a09d [project @ 2000-01-14 03:53:03 by jwe]
jwe
parents:
diff changeset
83 endfunction