I have the following MATLAB code:
audioFile= audioread('myFile'); %% Reshape according to the given distortion period distortionPeriod = 512; audioFile= length(audioFile) / distortionPeriod; audioFile= reshape(audioFile, [newLength, distortionPeriod]);
I noticed the following difference:
audioFileFft = fft(audioFile); % incorrect transform audioFileDftMat = audioFile * dftmtx(distortionPeriod); % correct transform >> norm(audioFileFft - audioFileDftMat ) ans = 1.2985e+03
Why this difference exist? I would expect that those two operation(
fft, dftmtx) would give the same result, as mentioned by MATLAB dftmtx's documentation.
How can I use the
fft and still get the same results I got using the