Finding Autocorrelation and PSD for a random matrix of 50x50

3 views (last 30 days)
tempvar = xcorr2(v,v);
[size_1 size_2] = size(tempvar);
size_1 = (size_1 + 1)/2 - 1;
R = (toeplitz(tempvar(size_1+1 : 2*size_1+1)))./size_1;
psd=abs(fftshift(fft(R)));
I like to know whats wrong.Because by theory, I should get a constant value for PSD. But I am getting varying values from 0.02 to 3.2

Answers (0)

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!