home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / octa21fb.zip / octave / SCRIPTS.ZIP / scripts / control / DEMOcontrol.m < prev    next >
Encoding:
Text File  |  1999-12-15  |  2.3 KB  |  80 lines

  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
  22. ## allows the user to select among several categories of OCST function:
  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
  39. ## of OCST functions.
  40. ## @end deftypefn
  41.  
  42. ## Demo programs: bddemo.m, frdemo.m, analdemo.m, moddmeo.m, rldemo.m
  43. ## Written by David Clem August 15, 1994
  44.  
  45. function DEMOcontrol ()
  46.  
  47.   disp(' 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')
  48.  
  49.   while (1)
  50.     clc
  51.     k = 0;
  52.     while (k > 8 || k < 1),
  53.       k = menu("Octave Controls System Toolbox Demo", ...
  54.     'System representation', ...
  55.         'Block diagram manipulations ', ...
  56.         'Frequency response functions ', ...
  57.         'State space analysis functions ', ...
  58.         'Root locus functions ', ...
  59.     'LQG/H2/Hinfinity functions ', ...
  60.         'End');
  61.  
  62.     endwhile
  63.     if(k == 1)
  64.       sysrepdemo
  65.     elseif (k == 2)
  66.       bddemo
  67.     elseif (k == 3)
  68.       frdemo
  69.     elseif (k == 4)
  70.       analdemo
  71.     elseif (k == 5)
  72.       rldemo
  73.     elseif (k == 6)
  74.       dgkfdemo
  75.     elseif (k == 7)
  76.       return
  77.     endif
  78.   endwhile
  79. endfunction
  80.