**4. Discussion**

Our previous research only verified the unitarity of the M-WFRFT via numerical simulation [1], but the simulation results are different from the theoretical proof in Section 3.2. Next, we will analyze and discuss this issue. Equation (10) can be verified using MATLAB, and its program is shown in Code 1.

**Code 1.** The program of Equation (10).


We tested from 2 to 1000 dimension and found that *Yk* was a real matrix only when the dimensions were

$$N = 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 18, 21, 28, 29, 32, 33, 44. \tag{71}$$

Therefore, the unitarity of the M-WFRFT is only available in the aforementioned cases.*Yk* has the following rules:

$$\begin{cases} \text{5-WFRFT} \Rightarrow & \text{Y}\_{0} \quad \text{Y}\_{1} \quad \text{Y}\_{2} \quad \text{Y}\_{3} \quad \text{Y}\_{4} \\ \text{6-WFRFT} \Rightarrow & \text{Y}\_{0} \quad \text{Y}\_{1} \quad \text{Y}\_{2} \quad \text{Y}\_{3} \quad \text{Y}\_{4} \quad \text{Y}\_{5} \\ \text{7-WFRFT} \Rightarrow & \text{Y}\_{0} \quad \text{Y}\_{1} \quad \text{Y}\_{2} \quad \text{Y}\_{3} \quad \text{Y}\_{4} \quad \text{Y}\_{5} \quad \text{Y}\_{6} \\ \text{8-WFRFT} \Rightarrow & \text{Y}\_{0} \quad \text{Y}\_{1} \quad \text{Y}\_{2} \quad \text{Y}\_{3} \quad \text{Y}\_{4} \quad \text{Y}\_{5} \quad \text{Y}\_{6} \\ & \vdots \\ \text{M-WFRFT} \Rightarrow & \text{Y}\_{0} \quad \text{Y}\_{1} \quad \text{Y}\_{2} \quad \text{Y}\_{3} \quad \text{Y}\_{4} \quad \text{Y}\_{4} \quad \text{N}- \quad \text{Y}\_{M-3} \quad \text{Y}\_{M-2} \quad \text{Y}\_{M-1} \end{cases} \tag{72}$$

where the blue *Yk* indicates that the result is zero.

For other dimensions, the M-WFRFT does not have unitarity, and *Yk* is as follows:


where the blue *Yk* indicates that the result is zero.

The numerical simulation results show that the M-WFRFT has unitarity only in certain dimensions. Following the theory of Section 3.2, the program is shown in Code 2. Our purpose is to compare the results of Code 2 with the results of Code 1.

**Code 2.** The program of Equation (36).


After verification, we found that the results of Codes 1 and 2 are the same. Therefore, the numerical simulation shows that the unitarity of the M-WFRFT is related to signal length. However, our theoretical analysis shows that the unitarity of the M-WFRFT does not depend on signal length. Therefore, there is a problem insofar as the simulation verification is inconsistent with the theoretical analysis. In order to solve this problem, we will analyze it with a specific numerical value. For Code 2, when *M* = 7 and *N* = 13, we can obtain the eigenvalue of the DFT in *line* 11 of Code 2. Therefore, the eigenvalue matrix *D* is

Then, for Equation (36), the calculated values of *Yk* (*k* = 0, 1, ··· , 6) are

In the results obtained, the values of *Y*3, *Y*<sup>4</sup> and *Y*<sup>5</sup> are zero; Equation (72) is verified. If *M* = 7 and *N* = 14, we can obtain the eigenvalue of the DFT in *line* 11 of Code 2. Therefore, the eigenvalue matrix *D* is

0

and *Y*<sup>4</sup> = *Y*3;

In the results obtained, the values of *Y*<sup>3</sup> and *Y*<sup>4</sup> are zero, and Equation (73) is verified. When *N* = 13, Equation (72) is obtained by means of Code 1. However, in the theoretical analysis, the nonzero terms of *Yk* are *Y*0, *Y*1, *Y*<sup>2</sup> and *Y*3, which are different from the simulation results presented by Equation (72). This problem is generated by fractional power operation, based on MATLAB, mainly in *line* 15 of Code 2 (*line* 12 of Code 1), and its operation *D*4*l*/*<sup>M</sup>* (*F*4*l*/*M*).

According to the deMoivre theorem, we know that

$$[r(\cos\theta + i\sin\theta)]^n = r^n(\cos n\theta + i\sin n\theta). \tag{87}$$

where *n* is a positive integer. Therefore, for Equation (87),

$$\mathbf{x}^n = r(\cos \theta + i \sin \theta),\tag{88}$$

the results have *n* roots

$$x\_k = \sqrt[n]{r} (\cos((\theta + 2k\pi)/n) + i\sin((\theta + 2k\pi)/n)).\tag{89}$$

where *k* = 0, 1, ··· , *n* − 1. However, in the numerical simulation, we only obtained one of the roots. For example, −*i* = cos(3*π*/2) + *i* sin(3*π*/2). Using MATLAB to calculate (−*i*) 1/2, we obtain 0.7071 <sup>−</sup> 0.7071*i*. The actual results should be that the two roots are 0.7071 − 0.7071*i* and −0.7071 + 0.7071*i*, respectively. This leads to the deviation between the simulation results (Equation (72)) and the theory (Section 3.2).

For *N* = 14, the simulation results (Equation (73)) show that the M-WFRFT does not have unitarity. However, the theoretical (Section 3.2) explanation has unitarity. This problem is caused by fractional exponentiation operation based on MATLAB. In Equation (80), we notice the position of the eigenvalue (−1), but after the fractional power operation based on MATLAB, Equations (83) and (85) appear. Therefore, the final numerical simulation results show that the M-WFRFT does not have unitarity. In fact, the correct result is the sum of Equations (83) and (85).

Using the above analysis, we explain the error of the operation based on MATLAB, which is also the clarification of our previous research work. The final conclusion is that

the M-WFRFT has unitarity. The M-WFRFT code is shown in Appendix A, and interested researchers can verify it.
