I have a under sampled signal x. which is a 2k Hz signal. This same signal is under sampled at 50Hz. I tried to extract to freq response of this signal but as the siganl is sampled below the Nyquest rate I am not able to get it. I also tried with pwelch() function but it is also not giving me correct reasult.
How should I calculate the power spectral density of this signal x?
fs = 50
t = 0:1/fs:2^22- 1/fs;
x = sin(2*pi*2000*t) ;
y = fft(x);
f = (0:length(y)-1)*50/length(y)*80;
num_segments = 32;
window_length = floor(length(x)/num_segments);
[PSDphase ,f] =pwelch(x ,window_length , , ,50 ,'twosided');
h=semilogx( f, (10* log10(PSDphase)), 'b');