echo on t = 0:0.001:1; x = randn+randn*sin(2*pi*50*t)... +randn*sin(2*pi*100*t)... +randn*sin(2*pi*150*t)... +randn*cos(2*pi*50*t)... +randn*cos(2*pi*100*t)... +randn*cos(2*pi*150*t); y = x + 0.2*randn(size(t)); plot(y(1:500)) pause Y = fft(y,512); Pyy = Y.* conj(Y) / 512; f = 1000*(0:256)/512; plot(f,Pyy(1:257)) pause Pyy(48:53) Pyy(98:103) Pyy(148:153)