Info

此问题已关闭。 请重新打开它进行编辑或回答。

separating a part of plot from an original fft plot

1 次查看(过去 30 天)
i have a fft plot of an audio file over the range 0 to 3000hz. now i want to separate the 1000 to 2000 hz part of the plot into a diff variable. how to do that...?????
thanks in advance

回答(1 个)

Tom
Tom 2012-3-9
you can use the greater than/ less than symbols to do this: say your frequency data is stored as X, and your FFT data is stored as Y.
Z=Y(X>=1000 & X<=2000)
  2 个评论
777
777 2012-3-9
i had that in mind but the problem here is that fft is stored in a variable which is i dont think a function of frequency.
Dr. Seis
Dr. Seis 2012-3-9
If the the number of data points (N) is even, then:
Fs = 6000;
Nyquist = Fs/2; % i.e., 3000 Hz
df = Fs/N;
X = ifftshift(-Nyquist:df:Nyquist-df);
if N is odd:
X = [(0:df:Nyquist) -1*sort(df:df:Nyquist,'descend')]

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by