Home > classes > @mfir > fromStandard.m

fromStandard

PURPOSE ^

Construct an mfir from a standard types

SYNOPSIS ^

function f = fromStandard(f, pli)

DESCRIPTION ^

 Construct an mfir from a standard types
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 FUNCTION:    fromStandard

 DESCRIPTION: Construct an mfir from a standard types

 CALL:        f = fromStandard(f, pli)

 PARAMETER:   type:     String with filter type description
              pli:       Parameter list object

 HISTORY:     22-03-2008 M Hueller
              Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Construct an mfir from a standard types
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % FUNCTION:    fromStandard
0005 %
0006 % DESCRIPTION: Construct an mfir from a standard types
0007 %
0008 % CALL:        f = fromStandard(f, pli)
0009 %
0010 % PARAMETER:   type:     String with filter type description
0011 %              pli:       Parameter list object
0012 %
0013 % HISTORY:     22-03-2008 M Hueller
0014 %              Creation
0015 %
0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 
0018 function f = fromStandard(f, pli)
0019 
0020   VERSION = '$Id: fromStandard.m,v 1.5 2008/09/04 13:37:14 ingo Exp $';
0021 
0022   ii = mfir.getInfo('mfir', 'From Standard Type');
0023   % Set the method version string in the minfo object
0024   ii.setMversion([VERSION '-->' ii.mversion]);
0025 
0026   % Add default values
0027   pl = combine(pli, ii.plists);
0028 
0029   % Get parameters
0030   type = find(pl, 'type');
0031 
0032   % check and fill parameter list
0033   plo = mfir.parseFilterParams(pl);
0034   switch type
0035     case 'lowpass'
0036       f = mklowpass(f, plo);
0037     case 'highpass'
0038       f = mkhighpass(f, plo);
0039     case 'bandpass'
0040       f = mkbandpass(f, plo);
0041     case 'bandreject'
0042       f = mkbandreject(f, plo);
0043     otherwise
0044       error('### unknown standard filter type in mfir constructor.');
0045   end
0046 
0047   % Add history
0048   f.addHistory(ii, pl, [], []);
0049 
0050 end % function f = mfirFromStandardType(type, pli, version, algoname)

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003