## 8 RDFT Algorithm for \(N=8\)  
For \(N=8\), the Equation (17) will take the form  
\[{\bf y}_{8}={\bf R}_{8}{\bf x}_{8} \tag{66}\]  
where  
\[{\bf R}_{8}= \begin{bmatrix}1&1&1&1&1&1&1\\ 1&\cos\phi_{8}&\cos 2\phi_{8}&\cos 3\phi_{8}&\cos 4\phi_{8}&\cos 5\phi_{8}& \cos 6\phi_{8}&\cos 7\phi_{8}\\ 1&\cos 2\phi_{8}&\cos 4\phi_{8}&\cos 6\phi_{8}&\cos 8\phi_{8}&\cos 10\phi_{8}& \cos 12\phi_{8}&\cos 14\phi_{8}\\ 1&\cos 3\phi_{8}&\cos 6\phi_{8}&\cos 9\phi_{8}&\cos 12\phi_{8}&\cos 15\phi_{8}& \cos 18\phi_{8}&\cos 21\phi_{8}\\ 1&\cos 4\phi_{8}&\cos 8\phi_{8}&\cos 12\phi_{8}&\cos 16\phi_{8}&\cos 20\phi_{8}& \cos 24\phi_{8}&\cos 28\phi_{8}\\ 0&-\sin 5\phi_{8}&-\sin 10\phi_{8}&-\sin 15\phi_{8}&-\sin 20\phi_{8}&-\sin 25\phi_{8}& -\sin 30\phi_{8}&-\sin 35\phi_{8}\\ 0&-\sin 6\phi_{8}&-\sin 12\phi_{8}&-\sin 18\phi_{8}&-\sin 24\phi_{8}&-\sin 30\phi_{8}& -\sin 36\phi_{8}&-\sin 42\phi_{8}\\ 0&-\sin 7\phi_{8}&-\sin 14\phi_{8}&-\sin 21\phi_{8}&-\sin 28\phi_{8}&-\sin 35\phi_{8}& -\sin 42\phi_{8}&-\sin 49\phi_{8}\end{bmatrix}  \tag{67}\]  
Since \(\phi_{8}=2\pi/8\) then \(\cos 2\phi_{0}=0\), \(\cos 3\phi_{8}=-\cos\phi_{8}\), \(\cos 4\phi_{8}=-1\), \(\cos 5\phi_{8}=-\cos\phi_{8}\), \(\cos 6\phi_{8}=0\), \(\cos 7\phi_{8}=\cos\phi_{8}\), \(\cos 8\phi_{8}=1\), \(\cos 9\phi_{8}=\cos\phi_{8}\), \(\cos 10\phi_{8}=0\), \(\cos 12\phi_{8}=-1\), \(\cos 14\phi_{8}=0\), \(\cos 15\phi_{8}=\cos\phi_{8}\), \(\cos 16\phi_{8}=1\), \(\cos 18\phi_{8}=0\), \(\cos 20\phi_{8}=-1\), \(\cos 21\phi_{8}=-\cos\phi_{8}\), \(\cos 24\phi_{8}=1\), \(\cos 28\phi_{8}=-1\), and \(\sin 5\phi_{8}=-\sin\phi_{8}\), \(\sin 6\phi_{8}=-1\), \(\sin 7\phi_{8}=-\sin\phi_{8}\), \(\sin 10\phi_{8}=1\), \(\sin 12\phi_{8}=0\), \(\sin 14\phi_{8}=-1\), \(\sin 15\phi_{8}=-\sin\phi_{8}\), \(\sin 18\phi_{8}=1\), \(\sin 20\phi_{8}=0\), \(\sin 21\phi_{8}=-\sin\phi_{8}\), \(\sin 24\phi_{8}=0\), \(\sin 25\phi_{8}=\sin\phi_{8}\), \(\sin 28\phi_{8}=0\), \(\sin 30\phi_{8}=-1\), \(\sin 35\phi_{8}=\sin\phi_{8}\), \(\sin 36\phi_{8}=0\), \(\sin 42\phi_{8}=1\), \(\sin 49\phi_{8}=\sin\phi_{8}\), so the \({\bf R}_{8}\) matrix will take the form  
\[{\bf R}_{8}= \begin{bmatrix}1&1&1&1&1&1&1\\ 1&\cos\phi_{8}&0&-\cos\phi_{8}&-1&-\cos\phi_{8}&0&\cos\phi_{8}\\ 1&0&-1&0&1&0&-1&0\\ 1&-\cos\phi_{8}&0&\cos\phi_{8}&-1&\cos\phi_{8}&0&-\cos\phi_{8}\\ 1&-1&1&-1&1&-1&1&-1\\ 0&\sin\phi_{8}&-1&\sin\phi_{8}&0&-\sin\phi_{8}&1&-\sin\phi_{8}\\ 0&1&0&-1&0&1&0&-1\\ 0&\sin\phi_{8}&1&\sin\phi_{8}&0&-\sin\phi_{8}&-1&-\sin\phi_{8}\end{bmatrix}  \tag{68}\]When we calculate the product of this matrix by the input vector \(\mathbf{x}_{8}\) we obtain  
\[ \begin{bmatrix}y_{0}\\ y_{1}\\ y_{2}\\ y_{3}\\ y_{4}\\ y_{5}\\ y_{6}\\ y_{7}\end{bmatrix} = \begin{bmatrix}[(x_{0}+x_{4})+(x_{2}+x_{6})]+[(x_{1}+x_{7})+(x_ {3}+x_{5})]\\ (x_{0}-x_{4})+\cos\phi_{8}[(x_{1}+x_{7})-(x_{3}+x_{5})]\\ (x_{0}+x_{4})-(x_{2}+x_{6})\\ (x_{0}-x_{4})+\cos\phi_{8}[-(x_{1}+x_{7})+(x_{3}+x_{5})]\\ [(x_{0}+x_{4})+(x_{2}+x_{6})]-[(x_{1}+x_{7})+(x_{3}+x_{5})]\\ -(x_{2}-x_{6})+\sin\phi_{8}[(x_{1}-x_{7})-(x_{3}-x_{5})]\\ (x_{1}-x_{7})-(x_{3}-x_{5})\\ (x_{2}-x_{6})+\sin\phi_{8}[(x_{1}-x_{7})+(x_{3}-x_{5})]\end{bmatrix}  \tag{69}\]  
Figure 6 shows a data-flow diagram corresponding to the calculation of the output vector \(\mathbf{y}_{8}\), where \(d_{3}=\cos\phi_{8}\) and \(d_{5}=\sin\phi_{8}\). When the vector \(\mathbf{z}_{8}=\mathbf{a}_{8}+i\mathbf{b}_{8}\) of complex coefficients of DFT for the real input vector \(\mathbf{x}_{8}\) is needed, it can be easily obtained from the output vector \(\mathbf{y}_{8}\) of RDFT, according to (15)  
\[\mathbf{a}_{8}= \begin{bmatrix}a_{0}\\ a_{1}\\ a_{2}\\ a_{3}\\ a_{4}\\ a_{5}\\ a_{6}\\ a_{7}\end{bmatrix} = \begin{bmatrix}y_{0}\\ y_{1}\\ y_{2}\\ y_{3}\\ y_{4}\\ y_{3}\\ y_{2}\\ y_{1}\end{bmatrix} \quad\mathbf{b}_{8}= \begin{bmatrix}b_{0}\\ b_{1}\\ b_{2}\\ b_{3}\\ b_{4}\\ b_{5}\\ b_{6}\\ b_{7}\end{bmatrix} = \begin{bmatrix}0\\ -y_{7}\\ -y_{6}\\ -y_{5}\\ 0\\ y_{5}\\ y_{6}\\ y_{7}\end{bmatrix}