File: bode.dem

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (38 lines) | stat: -rw-r--r-- 713 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright INRIA

                  //////////////////
                  //BODE PLOTS//////
                  //////////////////
xbasc();xselect()
//First plot using state space representation
//
//   xd=-2*%pi*x+u
//    y=18*%pi*x+u
//
// h(s)=18*%pi/(s+2*%pi)
//
   a=-2*%pi;
   b=1;
   c=18*%pi;
   d=1;
   sl=syslin('c',a,b,c,d);ssprint(sl)
   bode(sl,.1,100),
   halt()
   xbasc();
//Second plot using poly
   s=poly(0,'s');
   h1=1/real((s+2*%pi*(15+100*%i))*(s+2*%pi*(15-100*%i)));
   h1=syslin('c',h1)
   bode(h1,10,1000,.01),
   halt()
   xbasc();
 
//Third plot which combines the first two plots
   bode([h1;sl],.1,1000,.01);

   halt()
   xbasc();

// series connection
   bode(h1*sl,.1,1000,.01);