Mercurial > hg > ltpda
comparison m-toolbox/classes/@miir/fromLISO.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 % FROMLISO Construct a miir filter from a LISO file | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % FUNCTION: fromLISO | |
5 % | |
6 % DESCRIPTION: Construct a miir filter from a LISO file | |
7 % | |
8 % CALL: f = fromLISO(f, pli) | |
9 % | |
10 % PARAMETER: f: Empty miir-object | |
11 % pli: input plist (must contain the filename) | |
12 % | |
13 % VERSION: $Id: fromLISO.m,v 1.9 2011/08/15 11:22:50 hewitson Exp $ | |
14 % | |
15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
16 | |
17 function f = fromLISO(f, pli) | |
18 | |
19 VERSION = '$Id: fromLISO.m,v 1.9 2011/08/15 11:22:50 hewitson Exp $'; | |
20 | |
21 ii = f.getInfo(class(f), 'From LISO File'); | |
22 | |
23 % Set the method version string in the minfo object | |
24 ii.setMversion([VERSION '-->' ii.mversion]); | |
25 | |
26 % Add default values | |
27 pl = applyDefaults(ii.plists, pli); | |
28 | |
29 filename = find(pl, 'filename'); | |
30 filt = miir.filload(filename); | |
31 | |
32 f.name = filt.name; | |
33 f.fs = filt.fs; | |
34 f.a = filt.gain*filt.a; | |
35 f.b = filt.b; | |
36 f.histin = filt.histin; | |
37 f.histout = filt.histout; | |
38 f.infile = filename; | |
39 | |
40 if isempty(pl.find('name')) | |
41 pl.pset('name', filt.name); | |
42 end | |
43 | |
44 f.addHistory(ii, pl, [], []); | |
45 | |
46 % Set object properties | |
47 f.setObjectProperties(pl); | |
48 | |
49 end % pzm = pzmFromLISO(filename, version, algoname) | |
50 |