Documentation |
Wavelet and scaling functions
[PHI,PSI,XVAL] = wavefun('wname',ITER)
[PHI1,PSI1,PHI2,PSI2,XVAL] = wavefun('wname',ITER)
[PHI,PSI,XVAL] = wavefun('wname',ITER)
[PSI,XVAL] = wavefun('wname',ITER)
[...] = wavefun(wname,A,B)
[...] = wavefun('wname',max(A,B))
[...] = wavefun('wname',0)
[...] = wavefun('wname',8,0)
[...] = wavefun('wname')
[...] = wavefun('wname',8)
The function wavefun returns approximations of the wavelet function 'wname' and the associated scaling function, if it exists. The positive integer ITER determines the number of iterations computed; thus, the refinement of the approximations.
For an orthogonal wavelet:
[PHI,PSI,XVAL] = wavefun('wname',ITER) returns the scaling and wavelet functions on the points grid XVAL.
For a biorthogonal wavelet:
[PHI1,PSI1,PHI2,PSI2,XVAL] = wavefun('wname',ITER) returns the scaling and wavelet functions both for decomposition (PHI1,PSI1) and for reconstruction (PHI2,PSI2).
For a Meyer wavelet:
[PHI,PSI,XVAL] = wavefun('wname',ITER)
For a wavelet without scaling function (e.g., Morlet, Mexican Hat, Gaussian derivatives wavelets or complex wavelets):
[PSI,XVAL] = wavefun('wname',ITER)
[...] = wavefun(wname,A,B), where A and B are positive integers, is equivalent to [...] = wavefun('wname',max(A,B)), and draws plots.
When A is set equal to the special value 0,
[...] = wavefun('wname',0) is equivalent to
[...] = wavefun('wname',8,0).
[...] = wavefun('wname') is equivalent to
[...] = wavefun('wname',8).
The output arguments are optional.
On the following graph, 10 piecewise linear approximations of the sym4 wavelet obtained after each iteration of the cascade algorithm are shown.
% Set number of iterations and wavelet name. iter = 10; wav = 'sym4'; % Compute approximations of the wavelet function using the % cascade algorithm. for i = 1:iter [phi,psi,xval] = wavefun(wav,i); plot(xval,psi); hold on end title(['Approximations of the wavelet ',wav, ... ' for 1 to ',num2str(iter),' iterations']); hold off