Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

separating a part of plot from an original fft plot

1 vue (au cours des 30 derniers jours)
777
777 le 9 Mar 2012
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (1)

Tom
Tom le 9 Mar 2012
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 commentaires
777
777 le 9 Mar 2012
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 le 9 Mar 2012
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')]

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by