Hi everybody.
I'm having some problems with a project I need to do for school. We have to make an analyzer for noise. We have to record some sound samples, and than do a fouriertransform of it, so that we can see the frequencies of the sound. That's working fine, but than the next step is to split the frequency spectrum into 3 intervals
- 1 with the low frequencies: 0-255 Hz
- 1 with the middle frequencies: 256Hz – 2kHz
- 1 with the higher frequencies 2KHz or higher.
clear all clc Fs = 4000; % Sampling frequency
T = 1/Fs; % Sample time
L = 1000; % Length of signal
t = (0:L-1)*T; % Time vector
% Record your voice for 5 seconds.
recObj = audiorecorder(Fs, 24, 1); recordblocking(recObj,5); disp('End of Recording.'); % Store data in double-precision array.
myRecording = getaudiodata(recObj); FFT = 2^nextpow2(L); % Next power of 2 from length of y
fourier = fft(myRecording); Y = fft(myRecording,FFT)/L; f = Fs/2*linspace(0,1,FFT/2+1); %Plot single-sided amplitude spectrum.
plot(f,2*abs(Y(1:FFT/2+1))) title('Single-Sided Amplitude Spectrum of y(t)') axis([20 Inf -Inf Inf]) xlabel('Frequency (Hz)') ylabel('|Y(f)|')
And this is an image from my plot when i let tones play of 500Hz, 800Hz and 1k5Hz
So that's working well
But I've no idea how I could split those things into intervals..
I don't want the whole solution, just a little push in the back, so I know what I've to do, so i can work on it again. Because now I'm just searching on the web for help or hints, with no result.
Help would be really appreciated 🙂
Best Answer