Hi
I want to design a narrow band singnal comprising frequencies of 100, 200, 300 and 400 Hz. it's variance is adjusted to 2, and a white noise with SNR of 30 db is added.
at the end I want to plot it's PSD, and my main problem is that I dont know how to use fft or how to set it's value
I wrot my matlab codes.
I am wondering if anybody could help me !?
Fs=2000;
t=0:1/Fs:1;
v=(cos(2*pi*100*t)+cos(2*pi*200*t)+cos(2*pi*300*t)+cos(2*pi*400*t));
snr=30;
k=awgn(v,snr);
Hp=spectrum.welch; Hp.segmentlength=600;
Hp.FFTlength='userdefined';
Pd=psd(Hp,k,'NFFT',3000,'Fs',Fs);
How should I find the correct value for nfft?
tnx