RFDave
Full Member level 6
matlab codes for attenuation vs frequency graph
Sorry, there isn't a simple code to do what you want to do. If I were doing this, I would do the following. I don't know how to do any of these things, but this is the approach I would take.
1-figure out how to record audio from a microphone into a matlab file. Poke around in the matlab documentation for audio input and output, I've seen some help pages on that, so I know that they exist. You'll probably have to start by recording a couple of second long audio clip.
2-Once you have the audio data, you can compute the power spectral density. pwelch would be my recommendation, but there are other possibilities for computing the power spectral density, and there are tradeoff's to be made.
3-Plot the power spectral density. THis is pretty straightforward with the plot command.
4-Once you have this working, you can iterate on your matlab until it's doing what you want.
Dave
Sorry, there isn't a simple code to do what you want to do. If I were doing this, I would do the following. I don't know how to do any of these things, but this is the approach I would take.
1-figure out how to record audio from a microphone into a matlab file. Poke around in the matlab documentation for audio input and output, I've seen some help pages on that, so I know that they exist. You'll probably have to start by recording a couple of second long audio clip.
2-Once you have the audio data, you can compute the power spectral density. pwelch would be my recommendation, but there are other possibilities for computing the power spectral density, and there are tradeoff's to be made.
3-Plot the power spectral density. THis is pretty straightforward with the plot command.
4-Once you have this working, you can iterate on your matlab until it's doing what you want.
Dave