## 5 RDFT Algorithm for \(N=5\)  
For \(N=5\), the Equation (17) will take the form  
\[\mathbf{y}_{5}=\mathbf{R}_{5}\mathbf{x}_{5} \tag{34}\]  
Figure 2: Data-flow diagram of the RDFT algorithm for \(N=4\). where  
\[\mathbf{R}_{5}= \begin{bmatrix}1&1&1&1&1\\ 1&\cos\phi_{5}&\cos 2\phi_{5}&\cos 3\phi_{5}&\cos 4\phi_{5}\\ 1&\cos 2\phi_{5}&\cos 4\phi_{5}&\cos 6\phi_{5}&\cos 8\phi_{5}\\ 0&-\sin 3\phi_{5}&-\sin 6\phi_{5}&-\sin 9\phi_{5}&-\sin 12\phi_{5}\\ 0&-\sin 4\phi_{5}&-\sin 8\phi_{5}&-\sin 12\phi_{5}&-\sin 16\phi_{5}\end{bmatrix}  \tag{35}\]  
Since \(\phi_{5}=2\pi/5\) then \(\cos 3\phi_{5}=\cos 2\phi_{5}\), \(\cos 4\phi_{5}=\cos\phi_{5}\), \(\cos 6\phi_{5}=\cos\phi_{5}\), \(\cos 8\phi_{5}=\cos 2\phi_{5}\) and \(\sin 3\phi_{5}=-\sin 2\phi_{5}\), \(\sin 4\phi_{5}=-\sin\phi_{5}\), \(\sin 6\phi_{5}=\sin\phi_{5}\), \(\sin 8\phi_{5}=-\sin 2\phi_{5}\), \(\sin 9\phi_{5}=-\sin\phi_{5}\), \(\sin 12\phi_{5}=\sin 2\phi_{5}\), \(\sin 16\phi_{5}=\sin\phi_{5}\), so the \(\mathbf{R}_{5}\) matrix will take the form  
\[\mathbf{R}_{5}= \begin{bmatrix}1&1&1&1&1\\ 1&\cos\phi_{5}&\cos 2\phi_{5}&\cos 2\phi_{5}&\cos\phi_{5}\\ 1&\cos 2\phi_{5}&\cos\phi_{5}&\cos\phi_{5}&\cos 2\phi_{5}\\ 0&\sin 2\phi_{5}&-\sin\phi_{5}&\sin\phi_{5}&-\sin 2\phi_{5}\\ 0&\sin\phi_{5}&\sin 2\phi_{5}&-\sin 2\phi_{5}&-\sin\phi_{5}\end{bmatrix}  \tag{36}\]  
When we calculate the product of this matrix by the input vector \(\mathbf{x}_{5}\) we obtain  
\[ \begin{bmatrix}y_{0}\\ y_{1}\\ y_{2}\\ y_{3}\\ y_{4}\end{bmatrix} = \begin{bmatrix}x_{0}+[(x_{1}+x_{4})+(x_{2}+x_{3})]\\ x_{0}+\cos\phi_{5}(x_{1}+x_{4})+\cos 2\phi_{5}(x_{2}+x_{3})\\ x_{0}+\cos 2\phi_{5}(x_{1}+x_{4})+\cos\phi_{5}(x_{2}+x_{3})\\ \sin 2\phi_{5}(x_{1}-x_{4})-\sin\phi_{5}(x_{2}-x_{3})\\ \sin\phi_{5}(x_{1}-x_{4})+\sin 2\phi_{5}(x_{2}-x_{3})\end{bmatrix}  \tag{37}\]  
To better understand the construction of the RDFT algorithm for \(N=5\), we will introduce the notations \(t_{1}=x_{1}+x_{4}\), \(t_{2}=x_{2}+x_{3}\), \(t_{3}=x_{2}-x_{3}\), \(t_{4}=x_{1}-x_{4}\), \(t_{0}=x_{0}+t_{1}+t_{2}\) and consider the sub-blocks of the output vector \(\mathbf{y}_{5}\). The first sub-block is  
\[ \begin{bmatrix}y_{1}\\ y_{2}\end{bmatrix} = \begin{bmatrix}x_{0}\\ x_{0}\end{bmatrix} + \begin{bmatrix}\cos\phi_{5}&\cos 2\phi_{5}\\ \cos 2\phi_{5}&\cos\phi_{5}\end{bmatrix}\begin{bmatrix}t_{1}\\ t_{2}\end{bmatrix} =\] \[= \begin{bmatrix}x_{0}\\ x_{0}\end{bmatrix} + \begin{bmatrix}1&1\\ 1&-1\end{bmatrix}\begin{bmatrix}\frac{\cos\phi_{5}+\cos 2\phi_{5}}{2}&0\\ 0&\frac{\cos\phi_{5}-\cos 2\phi_{5}}{2}\end{bmatrix}\begin{bmatrix}1&1\\ 1&-1\end{bmatrix}\begin{bmatrix}t_{1}\\ t_{2}\end{bmatrix}  \tag{38}\]  
We can also write it as  
\[ \begin{bmatrix}y_{1}\\ y_{2}\end{bmatrix} = \begin{bmatrix}t_{0}\\ t_{0}\end{bmatrix} + \begin{bmatrix}1&1\\ 1&-1\end{bmatrix}\begin{bmatrix}\frac{\cos\phi_{5}+\cos 2\phi_{5}}{2}-1&0\\ 0&\frac{\cos\phi_{5}-\cos 2\phi_{5}}{2}\end{bmatrix}\begin{bmatrix}1&1\\ 1&-1\end{bmatrix}\begin{bmatrix}t_{1}\\ t_{2}\end{bmatrix}  \tag{39}\]  
The second sub-block is  
\[ \begin{bmatrix}y_{3}\\ y_{4}\end{bmatrix} = \begin{bmatrix}-\sin\phi_{5}&\sin 2\phi_{5}\\ \sin 2\phi_{5}&\sin\phi_{5}\end{bmatrix}\begin{bmatrix}t_{3}\\ t_{4}\end{bmatrix} =\] \[= \begin{bmatrix}1&0&1\\ 0&1&1\end{bmatrix}\begin{bmatrix}-\sin\phi_{5}-\sin 2\phi_{5}&0&0\\ 0&\sin\phi_{5}-\sin 2\phi_{5}&0\\ 0&0&\sin 2\phi_{5}\end{bmatrix}\begin{bmatrix}1&0\\ 0&1\\ 1&1\end{bmatrix}\begin{bmatrix}t_{3}\\ t_{4}\end{bmatrix}  \tag{40}\]  
Figure 3 shows a data flow diagram corresponding to the calculation of the output vector, where \(d_{1}=(\cos\phi_{5}+\cos 2\phi_{5})/2-1\), \(d_{2}=(\cos\phi_{5}-\cos 2\phi_{5})/2\), \(d_{3}=-\sin\phi_{5}-\sin 2\phi_{5}\), \(d_{4}=\sin\phi_{5}-\sin 2\phi_{5}\) and \(d_{5}=\sin 2\phi_{5}\). When the vector \(\mathbf{z}_{5}=\mathbf{a}_{5}+i\mathbf{b}_{5}\) of complex coefficients of DFT for the real input vector \(\mathbf{x}_{5}\) is needed, it can be easily obtained from the output vector \(\mathbf{y}_{5}\) of RDFT, according to (16)  
\[\mathbf{a}_{5}= \begin{bmatrix}a_{0}\\ a_{1}\\ a_{2}\\ a_{3}\\ a_{4}\end{bmatrix} =