% call: run_dhdt_byfourier.m % Demo code for computing the matrix of the Hadamard transform % by simplifying codes of the fast Fouirer transform. % List of codes used here: % fht_1d.m - computing the DHdT by the paired-Foureir-transform % paired_1dFH.m - computing the DHdT by the paired-Foureir-transform % dhd_matrix1.m - computing the matrix of the DHdT by 'fht_1d.m' % dhd_matrix2.m - computing the matrix of the DHdT by 'paired_1dFH.m' % Artyom M. Grigoryan, December 2008. clear all; N=8; HM8a=dhd_matrix1(N); 1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 1 1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 1 1 1 1 1 HM8b=dhd_matrix2(N); % In this case we have the complex Hadamard matrix: [1 i -1 -i -1 -i 1 i 1 -i -1 i -1 i 1 -i 1 -1 1 -1 -1 1 -1 1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 1 1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 1 1 1 1 1]; % We can verify if this complex matrix is a unitary Hadamard matrix: Hc8*Hc8' 8 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 8 % Yes, is it.