Video Lecture Power spectrum Estimation part-2
Matlab Code
clc
clear
close all
t = 0:0.001:1-0.001;
x = cos(2*pi*100*t)+rand(1,length(t));
xdft = fft(x);
sxxf=abs(xdft).^2;
Fs = 1000;
omega = 0:(2*pi*Fs)/length(x):(2*pi*Fs)-(2*pi*Fs)/length(x);
figure
subplot(2,2,1)
plot(x)
subplot(2,2,2)
plot((periodogram(x)))
subplot(2,2,3)
plot(sxxf)
subplot(2,2,4)
plot(omega(1:length(x)/2+1),abs(xdft(1:length(x)/2+1)))
No comments:
Post a Comment