


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.12 2008/08/11 07:25:40 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.12 2008/08/11 07:25:40 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 %%% Exept for a struct as an input 0125 if ~(nargin == 1 && isstruct(varargin{1})) 0126 % set version 0127 obj.prependVersion('$Id: ltpda_filter.m,v 1.12 2008/08/11 07:25:40 hewitson Exp $'); 0128 end 0129 0130 if nargin == 1 0131 %%%%%%%%%% obj = ltpda_uoh(struct) %%%%%%%%%% 0132 if isstruct(varargin{1}) 0133 %%% Set properties which are declared in this class 0134 filter_struct = varargin{1}; 0135 obj.fs = filter_struct.fs; 0136 obj.infile = filter_struct.infile; 0137 obj.a = filter_struct.a; 0138 obj.histout = filter_struct.histout; 0139 end 0140 end 0141 0142 end 0143 end 0144 0145 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0146 % Methods (public) % 0147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0148 0149 methods 0150 varargout = setHistout(varargin) 0151 end 0152 0153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0154 % Methods (protected) % 0155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0156 0157 methods (Access = protected) 0158 obj = setA(obj, val) 0159 obj = setFs(obj, val) 0160 obj = setInfile(obj, val) 0161 end 0162 0163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0164 % Methods (static) % 0165 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0166 0167 methods (Static) 0168 function ii = getInfo(varargin) 0169 ii = utils.helper.generic_getInfo(varargin{:}, 'ltpda_filter'); 0170 end 0171 0172 function out = VEROUT() 0173 out = '$Id: ltpda_filter.m,v 1.12 2008/08/11 07:25:40 hewitson Exp $'; 0174 end 0175 0176 function out = SETS() 0177 out = {}; 0178 end 0179 0180 function out = getDefaultPlist() 0181 out = []; 0182 end 0183 0184 end 0185 0186 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0187 % Methods (abstract) % 0188 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0189 0190 methods (Abstract) 0191 end 0192 0193 end 0194