view m-toolbox/classes/@filterbank/fromFilters.m @ 30:317b5f447f3e database-connection-manager

Update workspaceBrowser
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% 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