**Appendix A**

M-WFRFT code is written; its basis function is the WFRFT. By calling "celldisp (Y)", *Yk* is verified in Section 3.1.

```
%% M-WFRFT (multi-weighted type fractional Fourier transform)
% The basis function Fˆ(4*l/M) is WFRFT
function F = mwfrft(alpha,M,N)
% This code is written by Tieyu Zhao, E-mail: zhaotieyu@neuq.edu.cn;
% alpha is the transform order;
% M is the resulting weighting term, for example: M = 4(4-WFRFT); M = 5(5-WFRFT)
% N is the length of the signal;
for l = 0:M−1
    yy = wfrft(N,4*l/M); % WFRFT
    y{l + 1} = yy;
end
% celldisp(y);
D = zeros(M);
for k = 1:M
    for h = 1:M
         D(h,k) = exp(−2*pi*i*(h−1)*(k−1)/M); % DFT
    end
end
for k = 1:M
    YY = zeros(N);
    for h = 1:M
         YY = YY + D(h,k)*y{h};
    end
    Y{k} = YY; % Yk is obtained in Section 3.1
end
```

```
% celldisp(Y)
B = zeros(1,M);
for k = 0:M−1
    B(k + 1) = B(k + 1) + exp(2*pi*i*k*alpha/M); % B_alpha
end
F = zeros(N);
for k = 0:M−1
    F = F + B(k + 1)*Y{k + 1}/M; % M-WFRFT
end
function F = wfrft(N,beta) % WFRFT
Y = eye(N);
y1 = fftshift(fft(Y))/(sqrt(N));
y2 = y1*y1;
y3 = conj(y1);
pl = zeros(1,4);
for k = 0:3
         pl(k + 1) = pl(k + 1) + exp(i*3*pi*(beta−k)/4)*cos(pi*(beta−k)/2)*cos(pi*(beta−k)/4);
end
F = pl(1)*Y + pl(2)*y1 + pl(3)*y2 + pl(4)*y3;
```