To implement 3 point moving average filter using convolution in matlab on wav file i used following code but the code is working but there is problem in convolution .here is the m file
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
lione felus
el 25 de Jul. de 2015
Respondida: Walter Roberson
el 25 de Jul. de 2015
problem in convolution plot help please
0 comentarios
Respuesta aceptada
Walter Roberson
el 25 de Jul. de 2015
You never apply the filter or the convolution to the sound array. You read in the sound array and you play the sound, but you never filter it.
You convolve [1 2 3] with the kernel 1/3*[1 1 1], and you use stem() to plot the result against [1 2 3], but that has nothing to do with the sound.
You filter [1 2 3] with 1/3*[1 1 1] but you never use the result.
You fft([1 2 3]) and you stem() the values [1 2 3] at the positions returned as fft() values. I would have expected you would stem using [1 2 3] as the positions (first argument) and the fft() as the values (second argument), but that is not what you did.
Please note that the result of fft() is usually complex. For plotting you should be considering plotting real() or imag() or abs() of the fft()
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!