Mercurial > hg > ltpda
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@miir/fromLISO.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,50 @@ +% FROMLISO Construct a miir filter from a LISO file +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% FUNCTION: fromLISO +% +% DESCRIPTION: Construct a miir filter from a LISO file +% +% CALL: f = fromLISO(f, pli) +% +% PARAMETER: f: Empty miir-object +% pli: input plist (must contain the filename) +% +% VERSION: $Id: fromLISO.m,v 1.9 2011/08/15 11:22:50 hewitson Exp $ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +function f = fromLISO(f, pli) + + VERSION = '$Id: fromLISO.m,v 1.9 2011/08/15 11:22:50 hewitson Exp $'; + + ii = f.getInfo(class(f), 'From LISO File'); + + % Set the method version string in the minfo object + ii.setMversion([VERSION '-->' ii.mversion]); + + % Add default values + pl = applyDefaults(ii.plists, pli); + + filename = find(pl, 'filename'); + filt = miir.filload(filename); + + f.name = filt.name; + f.fs = filt.fs; + f.a = filt.gain*filt.a; + f.b = filt.b; + f.histin = filt.histin; + f.histout = filt.histout; + f.infile = filename; + + if isempty(pl.find('name')) + pl.pset('name', filt.name); + end + + f.addHistory(ii, pl, [], []); + + % Set object properties + f.setObjectProperties(pl); + +end % pzm = pzmFromLISO(filename, version, algoname) +