Hi all
it is just a trivial question.
How to compute quantization noise from its spectrum(from 0 to Nyquist frequency)?
suppose in matlab I have a variable QN, which is my quantization noise. of course I can do this:
Quote:QNP1=sum(QN.^2)/N % where N is the number of point and assuming power of 2
suppose I also want to calculate that noise power from frequency domain. so
Quote:s=abs(fft(QN));
s=(1:end/2)/N*2; % use only [0, Nyquist frequency] portion, and then scale the spectrum;
QNP2=sum(s.^2)
but this time I always get two-fold the number i get from time domain calculate(QNP1). I know I must have done sth. very silly, so please help me figure it out!
Thanks
Julian