


MIIR IIR filter object class constructor.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: MIIR IIR filter object class constructor.
Create a miir object.
SUPER CLASSES: ltpda_filter < ltpda_uoh < ltpda_uo < ltpda_obj
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.
fs - sample rate that the filter is designed for
infile - filename if the filter was loaded from file
a - set of numerator coefficients
histout - output history values to filter
Protected Properties (read only)
ntaps - number of coefficients in the filter
b -
histin - input history values to filter
MIIR Methods:
Defined Abstract methods:
char - returns one character string which represents the object
copy - copies an object
display - displays an object
string - converts an object to a command string which will
recreate the plist object.
update_struct - updates a object structure to the current tbx-version
Public methods:
setHistin - set the property 'histin'
redesign - redesign the input filter to work for the given sample rate.
resp - make a frequency response of the filter.
Protected methods:
setB - set the property 'b'
Private methods:
fromPzmodel - construct an miir from a pzmodel
fromAB - construct an miir from coefficients
fromStandard - construct an miir from a standard types
fromFile - construct an miir filter from a file
fromRepository - construct an miir filter from a repository
mklowpass - return a low pass filter
mkhighpass - return a high pass filter
mkbandpass - return a bandpass filter
mkbandreject - return a low pass filter
CONSTRUCTORS:
f = miir() - creates an empty miir object.
f = miir(fi) - creates a copy of the input miir object, fi.
f = miir(a,b,fs) - creates a miir object from the coefficient
vectors 'a' and 'b' **.
The sample rate for which the filter is
designed should be specified as well.
f = miir('foo_iir.fil') - create a miir object from a
LISO IIR .fil file.
f = miir('foo_iir.xml') - create a miir object loading the miir object
from disk.
f = miir('foo_iir.mat') - create a miir object loading the miir object
from disk.
f = miir(pl) - create a miir object from the description
given in the parameter list.
Parameter sets for plist constructor (in order of priority):
From XML File
-------------
Construct an MIIR by loading it from an XML file.
'filename' - construct an MIIR from a filename.
Example: plist('filename', 'm1.xml')
[default: empty string]
From MAT File
-------------
Construct an MIIR by loading it from a MAT file.
'filename' - construct an MIIR from a filename.
Example: plist('filename', 'm1.mat')
[default: empty string]
From LISO File
--------------
Construct an MIIR by loading it from a LISO file.
'filename' - construct an MIIR from a filename.
Example: plist('filename', 'm1.fil')
[default: empty string]
From Repository
---------------
Construct an MIIR by retrieving it from an LTPDA repository.
'Hostname' - the repository hostname. Only those objects which
are MIIRs are returned.
[default: 'localhost'];
Additional parameters:
'Database' - The database name [default: 'ltpda']
'ID' - A vector of object IDs. [default: []]
From Standard Type
------------------
Construct an MIIR of a standard type.
'type' - one of the types: 'highpass', 'lowpass',
'bandpass', 'bandreject' [default: 'lowpass']
You can also specify optional parameters:
'gain' - the gain of the filter [default: 1]
'fc' - the roll-off frequency [default: 0.1 Hz]
'fs' - the sampling frequency to design for [default: 1 Hz]
'order' - the filter order [default: 1]
'ripple' - pass/stop-band ripple for bandpass
and bandreject filters [default: 0.5]
From Pzmodel
------------
Construct an MIIR from a pzmodel.
'pzmodel' - a pzmodel object to construct the filter from [default: empty pzmodel]
From Plist
----------
'Plist' - construct from a plist. The value passed should be a plist
object.
[default: empty plist]
EXAMPLE 1: Create an order 1 highpass filter with high frequency gain 2.
Filter is designed for 10 Hz sampled data and has a cut-off
frequency of 0.2 Hz.
>> pl = plist('type', 'highpass', ...
'order', 1, ...
'gain', 2.0, ...
'fs', 10, ...
'fc', 0.2);
>> f = miir(pl)
NOTES: ** The convention used here for naming the filter coefficients is
the opposite to MATLAB's convention. The recursion formula
for this convention is
b(1)*y(n) = a(1)*x(n) + a(2)*x(n-1) + ... + a(na+1)*x(n-na)
- b(2)*y(n-1) - ... - b(nb+1)*y(n-nb)
M-FILE INFO: The following call returns an minfo object that contains
information about the miir constructor:
>> info = miir.getInfo
or >> info = miir.getInfo('miir')
You can get information about class methods by calling:
>> info = miir.getInfo(method)
e.g. >> info = miir.getInfo('eq')
You can also restrict the sets of parameters contained in
the minfo object by calling:
>> info = miir.getInfo(method, set)
e.g. >> info = miir.getInfo('miir', 'From Pzmodel')
VERSION: $Id: miir.m,v 1.69 2008/08/22 14:17:26 ingo Exp $
HISTORY: 09-02-2007 M Hewitson
Creation
11-02-2008 M Hueller
Help fixed
Default parameter list defined
SEE ALSO: mfir, ltpda_filter, ltpda_uoh, ltpda_uo, ltpda_obj, plist
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


0001 % MIIR IIR filter object class constructor. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: MIIR IIR filter object class constructor. 0005 % Create a miir object. 0006 % 0007 % SUPER CLASSES: ltpda_filter < ltpda_uoh < ltpda_uo < ltpda_obj 0008 % 0009 % PROPERTIES: 0010 % 0011 % Inherit Properties (read only) 0012 % name - name of object 0013 % created - creation time (time-object) 0014 % prov - contains a instance of the provenance class. 0015 % hist - history of the object (history object) 0016 % version - cvs-version string. 0017 % fs - sample rate that the filter is designed for 0018 % infile - filename if the filter was loaded from file 0019 % a - set of numerator coefficients 0020 % histout - output history values to filter 0021 % 0022 % Protected Properties (read only) 0023 % ntaps - number of coefficients in the filter 0024 % b - 0025 % histin - input history values to filter 0026 % 0027 % MIIR Methods: 0028 % 0029 % Defined Abstract methods: 0030 % char - returns one character string which represents the object 0031 % copy - copies an object 0032 % display - displays an object 0033 % string - converts an object to a command string which will 0034 % recreate the plist object. 0035 % update_struct - updates a object structure to the current tbx-version 0036 % 0037 % Public methods: 0038 % setHistin - set the property 'histin' 0039 % redesign - redesign the input filter to work for the given sample rate. 0040 % resp - make a frequency response of the filter. 0041 % 0042 % Protected methods: 0043 % setB - set the property 'b' 0044 % 0045 % Private methods: 0046 % fromPzmodel - construct an miir from a pzmodel 0047 % fromAB - construct an miir from coefficients 0048 % fromStandard - construct an miir from a standard types 0049 % fromFile - construct an miir filter from a file 0050 % fromRepository - construct an miir filter from a repository 0051 % mklowpass - return a low pass filter 0052 % mkhighpass - return a high pass filter 0053 % mkbandpass - return a bandpass filter 0054 % mkbandreject - return a low pass filter 0055 % 0056 % CONSTRUCTORS: 0057 % 0058 % f = miir() - creates an empty miir object. 0059 % f = miir(fi) - creates a copy of the input miir object, fi. 0060 % f = miir(a,b,fs) - creates a miir object from the coefficient 0061 % vectors 'a' and 'b' **. 0062 % The sample rate for which the filter is 0063 % designed should be specified as well. 0064 % f = miir('foo_iir.fil') - create a miir object from a 0065 % LISO IIR .fil file. 0066 % f = miir('foo_iir.xml') - create a miir object loading the miir object 0067 % from disk. 0068 % f = miir('foo_iir.mat') - create a miir object loading the miir object 0069 % from disk. 0070 % f = miir(pl) - create a miir object from the description 0071 % given in the parameter list. 0072 % 0073 % Parameter sets for plist constructor (in order of priority): 0074 % 0075 % From XML File 0076 % ------------- 0077 % 0078 % Construct an MIIR by loading it from an XML file. 0079 % 0080 % 'filename' - construct an MIIR from a filename. 0081 % Example: plist('filename', 'm1.xml') 0082 % [default: empty string] 0083 % 0084 % From MAT File 0085 % ------------- 0086 % 0087 % Construct an MIIR by loading it from a MAT file. 0088 % 0089 % 'filename' - construct an MIIR from a filename. 0090 % Example: plist('filename', 'm1.mat') 0091 % [default: empty string] 0092 % 0093 % From LISO File 0094 % -------------- 0095 % 0096 % Construct an MIIR by loading it from a LISO file. 0097 % 0098 % 'filename' - construct an MIIR from a filename. 0099 % Example: plist('filename', 'm1.fil') 0100 % [default: empty string] 0101 % 0102 % From Repository 0103 % --------------- 0104 % 0105 % Construct an MIIR by retrieving it from an LTPDA repository. 0106 % 0107 % 'Hostname' - the repository hostname. Only those objects which 0108 % are MIIRs are returned. 0109 % [default: 'localhost']; 0110 % 0111 % Additional parameters: 0112 % 'Database' - The database name [default: 'ltpda'] 0113 % 'ID' - A vector of object IDs. [default: []] 0114 % 0115 % From Standard Type 0116 % ------------------ 0117 % 0118 % Construct an MIIR of a standard type. 0119 % 0120 % 'type' - one of the types: 'highpass', 'lowpass', 0121 % 'bandpass', 'bandreject' [default: 'lowpass'] 0122 % 0123 % You can also specify optional parameters: 0124 % 'gain' - the gain of the filter [default: 1] 0125 % 'fc' - the roll-off frequency [default: 0.1 Hz] 0126 % 'fs' - the sampling frequency to design for [default: 1 Hz] 0127 % 'order' - the filter order [default: 1] 0128 % 'ripple' - pass/stop-band ripple for bandpass 0129 % and bandreject filters [default: 0.5] 0130 % 0131 % From Pzmodel 0132 % ------------ 0133 % 0134 % Construct an MIIR from a pzmodel. 0135 % 0136 % 'pzmodel' - a pzmodel object to construct the filter from [default: empty pzmodel] 0137 % 0138 % From Plist 0139 % ---------- 0140 % 0141 % 'Plist' - construct from a plist. The value passed should be a plist 0142 % object. 0143 % [default: empty plist] 0144 % 0145 % EXAMPLE 1: Create an order 1 highpass filter with high frequency gain 2. 0146 % Filter is designed for 10 Hz sampled data and has a cut-off 0147 % frequency of 0.2 Hz. 0148 % 0149 % >> pl = plist('type', 'highpass', ... 0150 % 'order', 1, ... 0151 % 'gain', 2.0, ... 0152 % 'fs', 10, ... 0153 % 'fc', 0.2); 0154 % >> f = miir(pl) 0155 % 0156 % NOTES: ** The convention used here for naming the filter coefficients is 0157 % the opposite to MATLAB's convention. The recursion formula 0158 % for this convention is 0159 % 0160 % b(1)*y(n) = a(1)*x(n) + a(2)*x(n-1) + ... + a(na+1)*x(n-na) 0161 % - b(2)*y(n-1) - ... - b(nb+1)*y(n-nb) 0162 % 0163 % M-FILE INFO: The following call returns an minfo object that contains 0164 % information about the miir constructor: 0165 % >> info = miir.getInfo 0166 % or >> info = miir.getInfo('miir') 0167 % 0168 % You can get information about class methods by calling: 0169 % >> info = miir.getInfo(method) 0170 % e.g. >> info = miir.getInfo('eq') 0171 % 0172 % You can also restrict the sets of parameters contained in 0173 % the minfo object by calling: 0174 % >> info = miir.getInfo(method, set) 0175 % e.g. >> info = miir.getInfo('miir', 'From Pzmodel') 0176 % 0177 % VERSION: $Id: miir.m,v 1.69 2008/08/22 14:17:26 ingo Exp $ 0178 % 0179 % HISTORY: 09-02-2007 M Hewitson 0180 % Creation 0181 % 11-02-2008 M Hueller 0182 % Help fixed 0183 % Default parameter list defined 0184 % 0185 % SEE ALSO: mfir, ltpda_filter, ltpda_uoh, ltpda_uo, ltpda_obj, plist 0186 % 0187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0188 0189 classdef miir < ltpda_filter 0190 0191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0192 % Property definition % 0193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0194 0195 %---------- Public (read/write) Properties ---------- 0196 properties 0197 end 0198 0199 %---------- Protected read-only Properties ---------- 0200 properties (SetAccess = protected) 0201 b = []; 0202 histin = []; 0203 end 0204 0205 %---------- Protected read-only Properties ---------- 0206 properties (SetAccess = protected, Dependent = true) 0207 ntaps 0208 end 0209 0210 %---------- Private Properties ---------- 0211 properties (GetAccess = protected, SetAccess = protected) 0212 end 0213 0214 %---------- Abstract Properties ---------- 0215 properties (Abstract = true, SetAccess = protected) 0216 end 0217 0218 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0219 % Check property setting % 0220 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0221 0222 methods 0223 function obj = set.histin(obj, val) 0224 if ~isempty(val) 0225 if ~isnumeric(val) || ~isreal(val) 0226 error('### The value for the property ''histin'' must be a real number(s)'); 0227 end 0228 end 0229 obj.histin = val; 0230 end 0231 function obj = set.b(obj, val) 0232 if ~isempty(val) 0233 if ~isnumeric(val) || ~isreal(val) 0234 error('### The value for the property ''b'' must be a real number(s)'); 0235 end 0236 end 0237 obj.b = val; 0238 end 0239 function obj = set.ntaps(obj, val) 0240 error('### Don''t set the property ''ntaps''. It is computed by max(length(a), length(b)).'); 0241 end 0242 end 0243 0244 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0245 % Compute the Dependent properties % 0246 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0247 0248 methods 0249 function val = get.ntaps(obj) 0250 val = max(length(obj.a), length(obj.b)); 0251 end 0252 end 0253 0254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0255 % Constructor % 0256 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0257 0258 methods 0259 function obj = miir(varargin) 0260 0261 import utils.const.* 0262 utils.helper.msg(msg.MNAME, 'running %s/%s', mfilename('class'), mfilename); 0263 0264 %%% Call superclass 0265 obj = obj@ltpda_filter(varargin{:}); 0266 0267 %%%%%%%%%% Set dafault values %%%%%%%%%% 0268 %%% Exept for a struct as an input 0269 if ~(nargin == 1 && isstruct(varargin{1})) 0270 % set version 0271 obj.prependVersion('$Id: miir.m,v 1.69 2008/08/22 14:17:26 ingo Exp $'); 0272 end 0273 0274 % Collect all miir objects 0275 [fs, invars, rest] = utils.helper.collect_objects(varargin(:), 'miir'); 0276 0277 if isempty(rest) && ~isempty(fs) 0278 % Do copy constructor and return 0279 utils.helper.msg(msg.OPROC1, 'copy constructor'); 0280 obj = copy(fs, 1); 0281 for kk=1:numel(obj) 0282 obj(kk).addHistory(miir.getInfo('miir', 'None'), [], [], obj(kk).hist); 0283 end 0284 return 0285 end 0286 0287 if nargin == 0 0288 utils.helper.msg(msg.OPROC1, 'empty constructor'); 0289 obj.addHistory(miir.getInfo('miir', 'None'), plist(), [], []); 0290 elseif nargin == 1 0291 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0292 %%%%%%%%%%%%%%%%%%%%%%%%%%% one input %%%%%%%%%%%%%%%%%%%%%%%%%%% 0293 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0294 0295 if ischar(varargin{1}) 0296 0297 %%%%%%%%%% f = miir('foo.mat') %%%%%%%%%% 0298 %%%%%%%%%% f = miir('foo.xml') %%%%%%%%%% 0299 %------- filename 0300 utils.helper.msg(msg.OPROC1, 'constructing from file %s', varargin{1}); 0301 obj = fromFile(obj, plist('filename', varargin{1})); 0302 0303 elseif isstruct(varargin{1}) 0304 %%%%%%%%%% f = miir(struct) %%%%%%%%%% 0305 %----------- struct 0306 utils.helper.msg(msg.OPROC1, 'constructing from struct'); 0307 0308 %%% Set properties which are declared in this class 0309 obj.b = varargin{1}.b; 0310 obj.histin = varargin{1}.histin; 0311 0312 elseif isa(varargin{1}, 'plist') 0313 %%%%%%%%%% f = miir(plist-object) %%%%%%%%%% 0314 %----------- plist 0315 pl = varargin{1}; 0316 filename = find(pl, 'filename'); 0317 hostname = find(pl, 'hostname'); 0318 conn = find(pl, 'conn'); 0319 type = find(pl, 'type'); 0320 pzm = find(pl, 'pzmodel'); 0321 ipl = find(pl, 'plist'); 0322 a = find(pl, 'a'); 0323 0324 % Selection of construction method 0325 if ~isempty(filename) 0326 utils.helper.msg(msg.OPROC1, 'constructing from file %s', filename); 0327 %--- Construct from file 0328 obj = fromFile(obj, pl); 0329 elseif ~isempty(hostname) || ~isempty(conn) 0330 utils.helper.msg(msg.OPROC1, 'constructing from repository %s', hostname); 0331 %--- Construct from repository 0332 % do hostname constructor 0333 obj = obj.fromRepository(pl); 0334 elseif ~isempty(type) 0335 utils.helper.msg(msg.OPROC1, 'constructing from standard %s', type); 0336 %--- Construct from standard type 0337 obj = fromStandard(obj, pl); 0338 elseif ~isempty(pzm) 0339 utils.helper.msg(msg.OPROC1, 'constructing from pzmodel %s', pzm.name); 0340 %--- Construct from pzmodel 0341 obj = fromPzmodel(obj, pl); 0342 elseif ~isempty(a) 0343 utils.helper.msg(msg.OPROC1, 'constructing from A/B coefficients'); 0344 %--- Construct from a,b coeffs 0345 obj = fromAB(obj, pl); 0346 elseif ~isempty(ipl) 0347 %--- Construct from plist 0348 % if the plist is empty, we return an empty MIIR 0349 if nparams(ipl) == 0 0350 else 0351 % do plist constructor 0352 obj = miir(ipl); 0353 end 0354 else 0355 %--- ERROR 0356 %%% is the plist is empty then return an empty MIIR 0357 if nparams(pl) == 0 0358 else 0359 error('### Unknown MIIR constructor method.'); 0360 end 0361 end 0362 elseif isa(varargin{1}, 'pzmodel') 0363 %%%%%%%%%% f = miir(pzmodel-object) %%%%%%%%%% 0364 %--- Construct from pzmodel 0365 utils.helper.msg(msg.OPROC1, 'constructing from pzmodel %s', varargin{1}.name); 0366 obj = fromPzmodel(obj, plist('pzmodel', varargin{1})); 0367 0368 else 0369 error('### Unknown single argument constructor.'); 0370 end 0371 elseif nargin == 2 0372 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0373 %%%%%%%%%%%%%%%%%%%%%%%%%%% two input %%%%%%%%%%%%%%%%%%%%%%%%%%% 0374 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0375 0376 %%%%%%%%%% f = miir(pzmodel-object, plist-object) %%%%%%%%%% 0377 % miir(pzmodel, pl) 0378 if isa(varargin{1}, 'pzmodel') && isa(varargin{2}, 'plist') 0379 utils.helper.msg(msg.OPROC1, 'constructing from pzmodel %s', varargin{1}.name); 0380 obj = fromPzmodel(obj, combine(plist('pzmodel', varargin{1}), varargin{2})); 0381 0382 elseif isa(varargin{1}, 'database') && isnumeric(varargin{2}) 0383 %%%%%%%%%% f = miir(<database-object>, [IDs]) %%%%%%%%%% 0384 % miir(<database-object>, [IDs]) 0385 utils.helper.msg(msg.OPROC1, 'retrieve from repository'); 0386 obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2})); 0387 0388 else 0389 error('### Unknown 2 argument constructor.'); 0390 end 0391 0392 elseif nargin == 3 0393 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0394 %%%%%%%%%%%%%%%%%%%%%%%%%% three input %%%%%%%%%%%%%%%%%%%%%%%%%% 0395 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0396 0397 utils.helper.msg(msg.OPROC1, 'constructing from A/B coefficients'); 0398 %%%%%%%%%% f = miir(a, b, fs) %%%%%%%%%% 0399 % a,b,fs constructor 0400 obj = fromAB(obj, plist('a', varargin{1}, 'b', varargin{2}, 'fs', varargin{3})); 0401 else 0402 error('### Unknown number of constructor arguments.'); 0403 end 0404 end % End constructor 0405 0406 end % End public methods 0407 0408 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0409 % Methods (static) % 0410 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0411 methods (Static) 0412 0413 varargout = update_struct(varargin); 0414 0415 function out = VEROUT() 0416 out = '$Id: miir.m,v 1.69 2008/08/22 14:17:26 ingo Exp $'; 0417 end 0418 0419 function ii = getInfo(varargin) 0420 ii = utils.helper.generic_getInfo(varargin{:}, 'miir'); 0421 end 0422 0423 function out = SETS() 0424 out = {... 0425 'From XML File', ... 0426 'From MAT File', ... 0427 'From LISO File', ... 0428 'From Repository', ... 0429 'From Standard Type', ... 0430 'From Pzmodel', ... 0431 'From AB', ... 0432 'From Plist'}; 0433 end 0434 0435 function out = getDefaultPlist(set) 0436 switch set 0437 %--- From a,b coeffs 0438 case 'From AB' 0439 out = plist('a', [], 'b', [], 'fs', []); 0440 %--- Repository constructor 0441 case 'From Repository' 0442 out = plist('hostname', 'localhost', 'database', 'ltpda', 'ID', []); 0443 %--- Create from description 0444 case 'From Standard Type' 0445 out = plist('type','lowpass', 'fc', 0.1, ... 0446 'gain', 1.0, 'fs', 1.0, 'order', 1, 'ripple', 0.5); 0447 %--- Create from a pzmodel 0448 case 'From Pzmodel' 0449 out = plist('pzmodel', pzmodel()); 0450 %--- Read from XML file 0451 case 'From XML File' 0452 out = plist('filename', ''); 0453 %--- Read from MAT file 0454 case 'From MAT File' 0455 out = plist('filename', ''); 0456 %--- Create from LISO file 0457 case 'From LISO File' 0458 out = plist('filename', ''); 0459 %--- Create from a plist 0460 case 'From Plist' 0461 out = plist('Plist', []); 0462 otherwise 0463 out = plist(); 0464 end 0465 end % function out = getDefaultPlist(varargin) 0466 0467 0468 end % End static methods 0469 0470 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0471 % Methods (static, private) % 0472 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0473 0474 methods (Static, Access=private) 0475 0476 f = filload(filename) 0477 plo = parseFilterParams(pl) 0478 0479 end % End static, private methods 0480 0481 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0482 % Methods (public) % 0483 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0484 0485 methods 0486 varargout = char(varargin); 0487 varargout = copy(varargin) 0488 varargout = display(varargin); 0489 varargout = string(varargin); 0490 0491 varargout = setHistin(varargin) 0492 varargout = redesign(varargin) 0493 varargout = resp(varargin) 0494 end 0495 0496 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0497 % Methods (protected) % 0498 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0499 0500 methods (Access = protected) 0501 obj = setB(obj, val) 0502 obj = fromLISO(obj, pli) 0503 end 0504 0505 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0506 % Methods (private) % 0507 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0508 0509 methods (Access = private) 0510 f = fromPzmodel(f, pli) 0511 f = fromAB(f, pli) 0512 f = fromStandard(f, pli) 0513 0514 f = mklowpass(f, pl) 0515 f = mkhighpass(f, pl) 0516 f = mkbandpass(f, pl) 0517 f = mkbandreject(f, pl) 0518 end 0519 0520 end % End classdef 0521 0522 % END 0523