问题描述
我写一个智能手机(Android设备,iPhone)的应用程序,做一些DSP。我是一个有经验的程序员。我也采取的一项本科EE类DSP和知道如何使用Matlab的。
I am writing a smartphone (Android, iPhone) application that does some DSP. I am an experienced programmer. I've also taken one undergraduate EE class in DSP and know how to use Matlab.
我想低通和带通滤波器适用于我的时域信号。从我的理解,我要履行我的时域采样和滤波系数的卷积。在Matlab中,我将使用FIR1()函数来获得滤波器系数和CONV()/过滤器()函数应用卷积。
I would like to apply low pass and band pass filters to my time-domain signal. From my understanding, I need to perform convolution of my time-domain samples and filter coefficients. In Matlab, I would use the fir1() function to get the filter coefficients and the conv()/filter() functions to apply the convolution.
我知道如何用Java编写/ C卷积功能,但我不知道如何生成的滤波器系数。我知道,对于低通滤波器,系数来自sinc函数,和带通滤波器基本上是一个移低通滤波器。 如何编程生成这些系数?
I know how to write the convolution function in Java/C, but I don't know how to generate the filter coefficients. I know that for the low-pass filter, the coefficients come from a sinc function, and the bandpass filter is basically a shifted low-pass filter. How can I programmatically generate these coefficients?
推荐答案
有$ C $下产生了使用窗口型正弦方法的相对=nofollow>。在code为约10行老式的基本的,但应该是平凡转换为C或Java。如果你想重新获得了code有该网页上的说明。
艺术,采用窗口型正弦的时候,是选择的最佳窗口。更现代的方法,只需要较少的猜测工作,是使用雷米兹交换算法生成从规格的过滤器
这篇关于产生的DSP滤波器系数中的C / Java进行时域卷积的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!