Azzera filtri
Azzera filtri

Need to generate bandpass filtered white-noise

10 visualizzazioni (ultimi 30 giorni)
Hi guys,
I am doing a psychophysical experiment and I need to generate two white noises, but which are bandpass filtered, the band of one shifted slightly higher than the other, so that the subjects can recognise the two sounds. The length needs to be 3s, fs of 44100 Hz.
I can generate the noise easily with the wgn function, but I am unable to bandpass filter it. Can someone please help me out?
Thanks

Risposta accettata

Honglei Chen
Honglei Chen il 27 Ott 2011
You will need to determine the spec of your filter and then create the filter. It looks like you are dealing with audios so I'll just use 20-20k Hz as an example. You can generate the filter like this.
fs = 44100;
hf = design(fdesign.bandpass('N,F3dB1,F3dB2',10,20,20e3,fs));
This creates a bandpass filter with pass band between 20 Hz and 20 kHz. You may or may not want this configuration so you may want to take a look at the help
doc fdesign.bandpass
Once you get the filter, assuming x is what you get from wgn, which is white noise, you can simply get the filtered noise by
y = filter(hf,x)
HTH

Più risposte (1)

Daniel Shub
Daniel Shub il 27 Ott 2011

Categorie

Scopri di più su Audio Processing Algorithm Design in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by