-
Notifications
You must be signed in to change notification settings - Fork 29
/
opWavelet.m
63 lines (54 loc) · 2.62 KB
/
opWavelet.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
classdef opWavelet < opWavelet2
%OPWAVELET Wavelet operator.
%
% opWavelet(N) creates a Wavelet transform for 1-dimensional signals
% of size N. The wavelet transformation is computed using the Rice
% Wavelet Toolbox.
%
% opWavelet(N,FAMILY) additionally specifies the FAMILY for the
% wavelet. Supported values for FAMILY are 'Daubechies' and 'Haar'.
%
% opWavelet(N,FAMILY,FILTER,LEVELS,REDUNDANT,TYPE) allows for four
% additional parameters: FILTER (default 8) specifies the filter
% length, which must be even. LEVELS (default 5) gives the number of
% levels in the transformation. P does not need to be divisible by
% 2^LEVELS. However, if LEVELS is bigger than LOG2(P), then LEVELS is
% adjusted to be equal to FLOOR(LOG2(P)). The Boolean field REDUNDANT
% (default false) indicates whether the wavelet is redundant. TYPE
% (default 'min') indictates what type of solution is desired; 'min'
% for minimum phase, 'max' for maximum phase, and 'mid' for mid-phase
% solutions.
%
% The opWavelet operator is linear but not orthogonal. Therefore, the
% transpose of the operator is not the inverse operator. However, the
% inverse of the operator can be obtained through a left-inverse
% operation. For example:
% W = opWavelet(...)
% y = W*x
% if z = W'*y, then z ~= x
% but, u = W\y, then u = x
% Copyright 2007-2009, Rayan Saab, Ewout van den Berg and Michael P. Friedlander
%
% June 6, 2012: Added mirror symmetric extension of signals that are not
% integer multiples of 2^levels.
% Hassan Mansour (hassanm@cs.ubc.ca)
% June 25, 2012: Overloaded mldivide function to compute the inverse of
% the operator.
% Hassan Mansour (hassanm@cs.ubc.ca)
%
% See the file COPYING.txt for full copyright information.
% Use the command 'spot.gpl' to locate this file.
% http://www.cs.ubc.ca/labs/scl/spot
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Methods - public
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
methods
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% opWavelet. Constructor.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function op = opWavelet(n, varargin)
op = op@opWavelet2(n,1,varargin{:});
op.type = 'Wavelet';
end % function opWavelet
end % methods - public
end % classdef