File: winfilt.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 (32 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (4)
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
////////////////////////
//WINDOWED FIR FILTERS//
////////////////////////
// Copyright INRIA
 
//Low pass filter (length 33, Kaiser window, cut-off .2)
   [wft,wfm,fr]=wfir('lp',33,[.2 0],'kr',[5.6 0]);
   plot2d(fr',log(wfm)')
   xtitle(' ','frequency','magnitude');
   xtitle(['Windowed FIR Low pass Filter';...
          'Kaiser window,cut-off:0.2';...
          'length 33'])
   halt();
         xbasc(); 
 
//Stop band filter (length 127, Hamming window, cut-offs .2 and .3)
   [wft,wfm,fr]=wfir('sb',127,[.2 .3],'hm',[0 0]);
   plot2d(fr',log(wfm)')
   xtitle(' ','frequency','magnitude')
   xtitle(['Windowed FIR Low pass Filter';...
          'Hamming window,cut-off:0.2,0.3';...
          'length 127'])
         xbasc(); 
 
//Band pass filter (length 55, Chebyshev window, cut-offs .15 and .35)
   [wft,wfm,fr]=wfir('bp',55,[.15 .35],'ch',[.001 -1]);
   plot2d(fr',log(wfm)')
   xtitle(' ','frequency','magnitude')
   xtitle(['Windowed FIR Band pass Filter';...
          'Chebyshev window,cut-off:0.15,0.35';...
          'length 55'])
         xbasc();