0001 function o = set_filters(o, H, G, RH, RG)
0002
0003
0004
0005
0006
0007
0008
0009
0010 switch nargin
0011 case 2
0012 if ~isstruct(H)
0013 error(['set_filters with 2 input arguments needs a filter structure' ...
0014 ' as second input']);
0015 end
0016 [errf msg] = pr_check_filters(H);
0017 if errf, error(msg); end
0018 o.filters = H;
0019 case 5
0020 o.filters = struct('H', H, ...
0021 'G', G, ...
0022 'RH', RH, ...
0023 'RG', RG);
0024 otherwise
0025 error(['Needs either: object and filter structure, or ' ...
0026 'object and high, low pass analysis and synthesis filters']);
0027 end
0028 return
0029
0030