diff m-toolbox/classes/@filterbank/fromFilters.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/@filterbank/fromFilters.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,39 @@
+% FROMFILTERS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% FUNCTION:    fromFilters
+%
+% DESCRIPTION: Construct an filterbank from a set of filters
+%
+% CALL:        fb = fromFilters(fb, pl)
+%
+% PARAMETER:   pl   - plist
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function obj = fromFilters(obj, pli)
+  
+  VERSION = '$Id: fromFilters.m,v 1.6 2011/08/15 13:40:33 hewitson Exp $';
+  
+  % get filterbank info
+  ii = filterbank.getInfo('filterbank', 'From Filters');
+  
+  % Set the method version string in the minfo object
+  ii.setMversion([VERSION '-->' ii.mversion]);
+  
+  % Combine input plist with default values
+  pl = applyDefaults(ii.plists, pli);
+  
+  % Set fields
+  filters  = pl.find('filters');
+  type     = pl.find('type');
+  
+  obj.filters = copy(filters,1);
+  obj.type    = type;
+  
+  % Add history
+  obj.addHistory(ii, pl, [], []);
+  
+  % Set object properties
+  obj.setObjectProperties(pl);
+  
+end