LTPDA_FILTER is the abstract base class for ltpda filter objects. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: LTPDA_FILTER is the abstract base class for ltpda filter objects. SUPER CLASSES: ltpda_uoh < ltpda_uo < ltpda_obj SUB CLASSES: miir, mfir PROPERTIES: Inherit Properties (read only) name - name of object created - creation time (time-object) prov - contains a instance of the provenance class. hist - history of the object (history object) version - cvs-version string. Protected Properties (read only) fs - sample rate that the filter is designed for infile - filename if the filter was loaded from file a - set of numerator coefficients histout - input history values to filter LTPDA_FILTER Methods: Public Methods setHistout - set the property 'histout' Protected Methods setA - set the property 'a' setFs - set the property 'fs' setInfile - set the property 'infile' M-FILE INFO: The following call returns an minfo object that contains information about the ltpda_filter constructor: >> info = ltpda_filter.getInfo or >> info = ltpda_filter.getInfo('ltpda_filter') VERSION: $Id: ltpda_filter.m,v 1.14 2008/09/03 16:32:47 hewitson Exp $ HISTORY: 09-06-2008 Hewitson Creation. SEE ALSO: miir, mfir, ltpda_uoh, ltpda_uo, ltpda_obj %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % LTPDA_FILTER is the abstract base class for ltpda filter objects. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: LTPDA_FILTER is the abstract base class for ltpda filter objects. 0005 % 0006 % SUPER CLASSES: ltpda_uoh < ltpda_uo < ltpda_obj 0007 % 0008 % SUB CLASSES: miir, mfir 0009 % 0010 % PROPERTIES: 0011 % 0012 % Inherit Properties (read only) 0013 % name - name of object 0014 % created - creation time (time-object) 0015 % prov - contains a instance of the provenance class. 0016 % hist - history of the object (history object) 0017 % version - cvs-version string. 0018 % 0019 % Protected Properties (read only) 0020 % fs - sample rate that the filter is designed for 0021 % infile - filename if the filter was loaded from file 0022 % a - set of numerator coefficients 0023 % histout - input history values to filter 0024 % 0025 % LTPDA_FILTER Methods: 0026 % 0027 % Public Methods 0028 % setHistout - set the property 'histout' 0029 % 0030 % Protected Methods 0031 % setA - set the property 'a' 0032 % setFs - set the property 'fs' 0033 % setInfile - set the property 'infile' 0034 % 0035 % M-FILE INFO: The following call returns an minfo object that contains 0036 % information about the ltpda_filter constructor: 0037 % >> info = ltpda_filter.getInfo 0038 % or >> info = ltpda_filter.getInfo('ltpda_filter') 0039 % 0040 % VERSION: $Id: ltpda_filter.m,v 1.14 2008/09/03 16:32:47 hewitson Exp $ 0041 % 0042 % HISTORY: 09-06-2008 Hewitson 0043 % Creation. 0044 % 0045 % SEE ALSO: miir, mfir, ltpda_uoh, ltpda_uo, ltpda_obj 0046 % 0047 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0048 0049 classdef ltpda_filter < ltpda_uoh 0050 0051 0052 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0053 % Property definition % 0054 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0055 0056 %---------- Public (read/write) Properties ---------- 0057 properties 0058 end 0059 0060 %---------- Protected read-only Properties ---------- 0061 properties (SetAccess = protected) 0062 fs = []; 0063 infile = ''; 0064 a = []; 0065 histout = []; 0066 end 0067 0068 %---------- Private Properties ---------- 0069 properties (GetAccess = protected, SetAccess = protected) 0070 end 0071 0072 %---------- Abstract Properties ---------- 0073 properties (Abstract = true, SetAccess = protected) 0074 end 0075 0076 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0077 % Check property setting % 0078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0079 0080 methods 0081 function obj = set.fs(obj, val) 0082 if ~isempty(val) 0083 if ~isnumeric(val) || ~isreal(val) || val < 0 0084 error('### The value for the property ''fs'' must be a real positive number'); 0085 end 0086 end 0087 obj.fs = val; 0088 end 0089 function obj = set.infile(obj, val) 0090 if ~(ischar(val) || isempty(val)) 0091 error('### The value for the property ''infile'' must be a string'); 0092 end 0093 obj.infile = val; 0094 end 0095 function obj = set.histout(obj, val) 0096 if ~isempty(val) 0097 if ~isnumeric(val) || ~isreal(val) 0098 error('### The value for the property ''histout'' must be a real number(s)'); 0099 end 0100 end 0101 obj.histout = val; 0102 end 0103 function obj = set.a(obj, val) 0104 if ~isempty(val) 0105 if ~isnumeric(val) || ~isreal(val) 0106 error('### The value for the property ''a'' must be a real number(s)'); 0107 end 0108 end 0109 obj.a = val; 0110 end 0111 end 0112 0113 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0114 % Constructor % 0115 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0116 0117 methods 0118 function obj = ltpda_filter(varargin) 0119 0120 %%% Call superclass 0121 obj = obj@ltpda_uoh(varargin{:}); 0122 0123 %%%%%%%%%% Set dafault values %%%%%%%%%% 0124 0125 if nargin == 1 0126 %%%%%%%%%% obj = ltpda_uoh(struct) %%%%%%%%%% 0127 if isstruct(varargin{1}) 0128 %%% Set properties which are declared in this class 0129 filter_struct = varargin{1}; 0130 obj.fs = filter_struct.fs; 0131 obj.infile = filter_struct.infile; 0132 obj.a = filter_struct.a; 0133 obj.histout = filter_struct.histout; 0134 end 0135 end 0136 0137 end 0138 end 0139 0140 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0141 % Methods (public) % 0142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0143 0144 methods 0145 varargout = setHistout(varargin) 0146 end 0147 0148 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0149 % Methods (protected) % 0150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0151 0152 methods (Access = protected) 0153 obj = setA(obj, val) 0154 obj = setFs(obj, val) 0155 obj = setInfile(obj, val) 0156 end 0157 0158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0159 % Methods (static) % 0160 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0161 0162 methods (Static) 0163 function ii = getInfo(varargin) 0164 ii = utils.helper.generic_getInfo(varargin{:}, 'ltpda_filter'); 0165 end 0166 0167 function out = VEROUT() 0168 out = '$Id: ltpda_filter.m,v 1.14 2008/09/03 16:32:47 hewitson Exp $'; 0169 end 0170 0171 function out = SETS() 0172 out = {}; 0173 end 0174 0175 function out = getDefaultPlist() 0176 out = []; 0177 end 0178 0179 end 0180 0181 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0182 % Methods (abstract) % 0183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0184 0185 methods (Abstract) 0186 end 0187 0188 end 0189