i could use too the signal proccesing toolbox...but it has very few functions for psd...can u tell how can i find more for this ?
There are enough PSD functions in the SP toolbox:
pburg - Burg's PSD estimation method
pcov - Covariance PSD estimation method
peig - Eigenvector PSD estimation method
periodogram - Periodogram PSD estimation method
pmcov - Modified Covariance PSD estimation method
pmtm - Thomson multitaper PSD estimation method
pmusic - Multiple Signal Classification PSD estimation method
pwelch - Welch's PSD estimation method
pyulear - Yule-Walker AR PSD estimation method
rooteig - Sinusoid frequency and power estimation via the eigenvector algorithm
rootmusic - Sinusoid frequency and power estimation via the MUSIC algorithm
spectrogram - Spectrogram using a Short-Time Fourier Transform (STFT)
i mean that for example the first time i ll examine psd for 64 data values...after that for 128 and then observe the resolution...so i ll need 64 different f for my code...right ?
You don't need to check all possible tone frequencies between -0.5 and +0.5, instead concentrate on small displacements which are close to 1/Dim.
I think that you need to do something like this:
beta=[b1,b2];
for k=6:10
Dim=2^k;
for m=1:10
dF=10-m;
f1=-dF/(2*Dim);
f2=dF/(2*Dim);
f=[f1,f2];
[y, t] = sg_cissoid(beta, f, Dim, 1, snr) ;
[PSD, F] = psd_welch(y, <Win>, <N_Overlap>, <N_FFT>, 1);
end
end
Keep in mind that the resolution capabilities of parametric methods like music and Burg can be better than you will be able to see with the PSD plots. And also, IMHO the PSD plot is not the best way to characterize resolution.
Contact me via PM if you have additional questions.