# A Class of Algorithms for Continuous Wavelet Transform Based on the Circulant Matrix
## 4 Numerical Experiments  
The experiments are conducted on two types of data, one for synthetic data, another for real-life data. Entropy can be used to measure the sparsity of wavelet coefficients [17]. In order to define entropy, \(\{|W_{f}(a_{i},b_{j})|^{2}\}_{i,j}\) are rearranged as \(\{c_{k}\}_{k=1,\ldots,M}\), then are normalized to obtain:  
\[d_{k}=\frac{c_{k}}{\sum_{k=1}^{M}c_{k}}. \tag{36}\]  
The wavelet entropy is calculated as  
\[Entropy=-\sum_{k=1}^{M}d_{k}\log d_{k}, \tag{37}\]  
with the convention \(0\log 0=0\) by definition. **Experiments for Data 1:** Data 1 is a synthetic signal with length \(N\). The first half contains sinusoidal signal superimposition with three different frequencies,namely \(a_{4}\sin(30\pi t)+a_{3}\sin(60\pi t)+a_{1}\sin(120\pi t)\); The latter half contains the 60 Hz sinusoidal signal with amplitude \(a_{2}\), namely \(a_{2}\sin(120\pi t)\), where \(a_{4}=1,a_{3}=1.2,a_{1}=1.4,a_{2}=0.6\), and the sampling frequency is 400 Hz. Data 1 with length \(N=1024\) is presented in Figure 1a. Figure 1b, the absolute values of CWT coefficients of Figure 1a, computed with the _avt_ function in Wavelab, where the shape parameter\(\sigma^{2}=1\) and the center frequency \(\eta=8\), manifests edge effects. Figure 1c without edge effects is computed by using the case 0 of Algorithm 3. Table 1 gives the computational results of Data 1 with wavelet parameter \(\sigma^{2}=1,\eta=8\) by using different methods. \"_cwt_\" means the _cwt_ function in wavelet toolbox of Matlab. \"[PERSON]'s method\" is an improved version of _cwt_[26]. \"Direct\" means the computation method of linear convolution by using Equation (15). If the length of signal is far larger than the length of the filter, an \"Overlap-add\" procedure for the calculation of linear convolution is faster than Direct method and Algorithm 1[23]. The \"wavelet entropy\" shown in Table 1 can measure the sparsity of wavelet coefficients [17]. \"Err_i\" means the relative error of \(a_{i}\) and the corresponding maximum amplitude of CWT coefficients. From Table 1, we know that the precision, wavelet entropy of \"Direct\", Algorithms 2 and 3, \"Overlap-add\" are almost the same and are more optimal to _cwt_ function in toolbox of Matlab. In fact, the precision of two methods in [17], \"FFT based method\" and the proposed method is almost the same. This phenomenon indicates some equivalence of these two methods. As a matter of fact, these two methods can be categorized as Algorithms 2 and 3 respectively. Figure 2 is computed by using the case 1 of Algorithm 3. The wavelet coefficients of Figure 2b can exactly characterize the time-frequency local properties of data of Figure 1a. At the same time, Figure 2a,c fail to do so. In fact, it is known from the case 1 of Algorithm 3, the wavelet coefficients should be chosen as the middle part of the coefficients of the convolution. However, the wavelet coefficients of Figure 2a,c are respectively chosen as the first \(N\) and the last \(N\) part of the coefficients of the convolution. Figure 1: (**a**) is Data 1 with \(N=1024\). (**b**) the absolute values of CWT coefficients of (**a**), computed with the _avt_ function in Wavelab, where the shape parameter \(\sigma^{2}=1\) and the center frequency \(\eta=8\), manifests edge effects. (**c**) without edge effects is computed with Algorithm 3. **Experiments for Data 2:** Data 2 is the annual average temperature from 1 January 1951 to 31 December 2010 for No. 50978 weather station, Heilongjiang, China. Figures 3-5, computed with different methods of CWT, namely, Algorithm 2, [PERSON]'s method, _cwt_ function in wavelet toolbox of Matlab, are the contours of the real part of coefficients of CWT for Data 2. The Morlet wavelet parameters are \(\sigma^{2}=1,\eta=5\). The coefficients with negative values are plotted with a dotted, blue line, while the coefficients with positive values are plotted with a dashed, red line. It is obvious from these figures that the precision of Algorithm 2 is superior to that of [PERSON]'s method and _cwt_ function of Matlab.