|
Hi, thank you for reply,
the extent of variation order is in the order of 100, if you change fs from 10 to 1000,so SNR changes dramatically.
I guess it is because of bandwidth, maybe I need to do sth to reflect the changes in bandwidth(fs).
"Wayne King" <wmkingty@gmail.com> wrote in message <gtuf3a$i8g$1@fred.mathworks.com>...
> Hi bin, when you say the average power of the noise changes, can you be a bit more specific about the extent of the variation? If you ran your code a number of times with the same sampling rate and hence vector length for the noise, you will inevitably get some variation in the estimated average noise power since you are using randn() to generate the noise.
> wayne
>
> "bin" <binpersonal@gmail.com> wrote in message <gtt23a$5nf$1@fred.mathworks.com>...
> > Dear all, I calculate the power of signal and noise after matched filter.
> > When changing sampling frequency(e.g. fs = 10 vs. fs 00), the power of signal doesn't change, why the power of noise changes?
> >
> > fs 00;
> > x = 0:1/fs:2*pi;
> > t = sin(x);
> > N = length(sin(x));
> > matchedfilter = fliplr(t);
> > noise = 1e-25*randn(1,N);
> >
> > outSignal = conv(t,matchedfilter)/N;
> > outNoise = conv(noise,matchedfilter)/N;
> > PowerS = sum(outSignal.^2)/length(outSignal)
> > PowerN = sum(outNoise.^2)/length(outNoise)
> >
> > Does it mean we can not calculate noise power directly using variance and need to consider bandwidth(sampling rate)?
> >
> > Thank you very much!
|