class constructor for phiw_lemarie object FORMAT [o, others] = phiw_lemarie(dim_div, others) inherits from phiw_wavelet Synopsis -------- o = phiw_lemarie(2); Inputs dim_div - a scalar, setting the width of the lemarie filter. The number is the number by which to divide the size of the processed dimension, to get the filter width. This number is always used when getting the filters to use; the filters are therefore not stored in the phiw_wavelet parent object others - optional structure with any other fields for phiw_wavelet (see phiw_wavelet) $Id: phiw_lemarie.m,v 1.4 2005/06/05 04:42:22 matthewbrett Exp $
0001 function [o, others] = phiw_lemarie(dim_div, others) 0002 % class constructor for phiw_lemarie object 0003 % FORMAT [o, others] = phiw_lemarie(dim_div, others) 0004 % inherits from phiw_wavelet 0005 % 0006 % Synopsis 0007 % -------- 0008 % o = phiw_lemarie(2); 0009 % 0010 % Inputs 0011 % dim_div - a scalar, setting the width of the lemarie filter. The 0012 % number is the number by which to divide the size of the 0013 % processed dimension, to get the filter width. This number 0014 % is always used when getting the filters to use; the filters 0015 % are therefore not stored in the phiw_wavelet parent object 0016 % 0017 % others - optional structure with any other fields for phiw_wavelet 0018 % (see phiw_wavelet) 0019 % 0020 % $Id: phiw_lemarie.m,v 1.4 2005/06/05 04:42:22 matthewbrett Exp $ 0021 0022 myclass = 'phiw_lemarie'; 0023 0024 % Default object structure; Lemarie filter, dividing processed dimension 0025 % size by 2 to get filter width 0026 defstruct = struct('dim_div', 2); 0027 0028 if nargin < 1 0029 dim_div = []; 0030 end 0031 if nargin < 2 0032 others = []; 0033 end 0034 0035 if isa(dim_div, myclass) 0036 o = dim_div; 0037 % Check for simple form of call 0038 if isempty(others), return, end 0039 0040 % Otherwise, we are being asked to set fields of object 0041 [p others] = mars_struct('split', others, defstruct); 0042 if isfield(p, 'dim_div'), o = dim_div(p.dim_div); end 0043 return 0044 end 0045 0046 % Check dim_div input argument 0047 if isempty(dim_div), dim_div = defstruct.dim_div; end 0048 if ~isnumeric(dim_div) | prod(size(dim_div)) > 1 0049 error('dim_div argument should be a scalar'); 0050 end 0051 0052 % set the phiw_wavelet object 0053 [phiw_w others] = phiw_wavelet(struct('H', [], ... 0054 'G', [], ... 0055 'RH', [], ... 0056 'RG', []), ... 0057 others); 0058 0059 % Return phiw_lemarie object 0060 params.dim_div = dim_div; 0061 o = class(params, myclass, phiw_w); 0062