~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to demos/control/pid.dem

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// Copyright INRIA
2
 
exec(SCI+'/demos/control/scheme.dem');
 
2
mode(-1)
 
3
//display the diagram
 
4
x=[5,10,20,40,50,70,80,90];xmin=-10;xmax=100;
 
5
y=[22,28,30,32];ymin=12;ymax=40;
 
6
 
 
7
xx=[xmin,xmin,x([1 2 2 7 4 6 3 4 5 6 3 3 5 5]);xmax,xmax,x([3,2,7,7,5,8,3,4,5,6,4,4,6,6])];
 
8
yy=[ymin,ymax,y([3,1,1,1,3,3,2,2,2,2,2,4,2,4]);ymin,ymax,y([3,3,1,3,3,3,4,4,4,4,2,4,2,4])];
 
9
    
 
10
xset("window",0);xbasc();xselect();
 
11
plot2d(xx,yy,ones(1,16),'022');
 
12
xstring(28,30,'K');xstring(56,30,'Plant');xstring(12,28.80,'-');
 
13
xtitle('PLANT   and   CONTROLLER')
 
14
mode(2)
3
15
 
4
16
s=poly(0,'s');z=poly(0,'z');
5
 
x_message('Example of PID Design ')
 
17
x_message(['Example of PID Design '
 
18
           'file: '+SCI+'/demos/control/pid.dem'])      
 
19
 
6
20
n=x_choose(['Continuous time';'Discrete time'],'Select time domain');
7
21
select n
8
22
 case 0