Documentation |
Wavelet and scaling functions 2-D
[PHI,PSI,XVAL] = wavefun('wname',ITER)
[S,W1,W2,W3,XYVAL] = wavefun2('wname',ITER,'plot')
[S,W1,W2,W3,XYVAL] = wavefun2(wname,A,B)
[S,W1,W2,W3,XYVAL] = wavefun2('wname',max(A,B))
[S,W1,W2,W3,XYVAL] = wavefun2('wname',0)
[S,W1,W2,W3,XYVAL] = wavefun2('wname',4,0)
[S,W1,W2,W3,XYVAL] = wavefun2('wname')
[S,W1,W2,W3,XYVAL] = wavefun2('wname',4)
For an orthogonal wavelet 'wname', wavefun2 returns the scaling function and the three wavelet functions resulting from the tensor products of the one-dimensional scaling and wavelet functions.
If [PHI,PSI,XVAL] = wavefun('wname',ITER), the scaling function S is the tensor product of PHI and PSI.
The wavelet functions W1, W2, and W3 are the tensor products (PHI,PSI), (PSI,PHI), and (PSI,PSI), respectively.
The two-dimensional variable XYVAL is a 2^{ITER} x 2^{ITER} points grid obtained from the tensor product (XVAL,XVAL).
The positive integer ITER determines the number of iterations computed and thus, the refinement of the approximations.
[S,W1,W2,W3,XYVAL] = wavefun2('wname',ITER,'plot') computes and also plots the functions.
[S,W1,W2,W3,XYVAL] = wavefun2(wname,A,B),
where A and B are positive integers,
is equivalent to
[S,W1,W2,W3,XYVAL] = wavefun2('wname',max(A,B)).
The resulting functions are plotted.
When A is set equal to the special value 0,
[S,W1,W2,W3,XYVAL] = wavefun2('wname',0) is equivalent to [S,W1,W2,W3,XYVAL] = wavefun2('wname',4,0).
[S,W1,W2,W3,XYVAL] = wavefun2('wname') is equivalent to [S,W1,W2,W3,XYVAL] = wavefun2('wname',4).
The output arguments are optional.
Note The wavefun2 function can only be used with an orthogonal wavelet. |
On the following graph, a linear approximation of the sym4 wavelet obtained using the cascade algorithm is shown.
% Set number of iterations and wavelet name. iter = 4; wav = 'sym4'; % Compute approximations of the wavelet and scale functions using % the cascade algorithm and plot. [s,w1,w2,w3,xyval] = wavefun2(wav,iter,0);