Construct an miir from a standard types %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION: fromStandard DESCRIPTION: Construct an miir 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % Construct an miir from a standard types 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % FUNCTION: fromStandard 0005 % 0006 % DESCRIPTION: Construct an miir 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 function f = fromStandard(f, pli) 0018 0019 VERSION = '$Id: fromStandard.m,v 1.5 2008/09/04 13:37:14 ingo Exp $'; 0020 0021 ii = miir.getInfo('miir', 'From Standard Type'); 0022 % Set the method version string in the minfo object 0023 ii.setMversion([VERSION '-->' ii.mversion]); 0024 0025 % Add default values 0026 pl = combine(pli, ii.plists); 0027 0028 % Get parameters 0029 type = find(pl, 'type'); 0030 0031 % check and fill parameter list 0032 plo = miir.parseFilterParams(pl); 0033 switch type 0034 case 'lowpass' 0035 f = mklowpass(f, plo); 0036 case 'highpass' 0037 f = mkhighpass(f, plo); 0038 case 'bandpass' 0039 f = mkbandpass(f, plo); 0040 case 'bandreject' 0041 f = mkbandreject(f, plo); 0042 otherwise 0043 error('### unknown standard filter type in miir constructor.'); 0044 end 0045 0046 % Add history 0047 f.addHistory(ii, pl, [], []); 0048 0049 end % function f = miirFromStandardType(type, pli, version, algoname)