I have signal and i want to plot it's power spectral density , What should i do? is it right if i first calculate the FFT of a signal and then get the square abs of it's value?
John Williams answered .
2025-11-20
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = cos(2*pi*100*t)+randn(size(t));
[Pxx,F] = periodogram(x,[],length(x),Fs);
plot(F,10*log10(Pxx))