Mercurial > hg > ltpda
comparison m-toolbox/classes/@mfir/mkbandreject.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % MKBANDREJECT return a low pass filter mfir(). A Butterworth filter is used. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: MKBANDREJECT return a low pass filter mfir(). | |
5 % A Butterworth filter is used. | |
6 % | |
7 % CALL: f = mkbandreject(f, pl) | |
8 % | |
9 % VERSION: $Id: mkbandreject.m,v 1.10 2011/04/04 11:37:02 hewitson Exp $ | |
10 % | |
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
12 | |
13 function f = mkbandreject(f, pl) | |
14 | |
15 g = find(pl, 'gain'); | |
16 fc = find(pl, 'fc'); | |
17 fs = find(pl, 'fs'); | |
18 order = find(pl, 'order'); | |
19 win = find(pl, 'Win'); | |
20 | |
21 utils.helper.checkFilterOptions(pl); | |
22 | |
23 f.name = 'bandreject'; | |
24 f.fs = fs; | |
25 f.a = g.*fir1(order, 2.*fc/fs, 'stop', win.win); | |
26 f.gd = (f.ntaps-1)/2; | |
27 f.histout = zeros(1,f.ntaps-1); % initialise output history | |
28 end | |
29 |