matlab - MATLAB 中的低通/带通滤波器设计

标签 matlab communication lowpass-filter

对于 MATLAB 中的模拟通信系统设计,我首先需要进行以下两项设计:

  1. 设计一个低通滤波器[slow]=lowpassfilter(s,fcut,fs),以截止频率fcut过滤输入信号s 和采样频率 fs(以赫兹为单位)。

  2. 设计一个带通滤波器[sband]=bandpassfilter(s,fcutlow,fcuthigh,fs),用截止频率过滤输入信号s >fcutlowfcuthigh 以及采样频率 fs(以赫兹为单位)。

你能帮我一下吗?

最佳答案

我发现这个问题有很多观点,但仍然没有好的答案。

以下代码将满足您的需要。由于没有指定过滤器类型,我使用巴特沃斯过滤器来演示它。 s 是输入信号,x 是滤波后的信号。 fs 是以 Hz 为单位的采样率。

% Design and apply the lowpass filter
order = 4;
fcut  = 8000;
[b,a] = butter(order,fcut/(fs/2),'low');
x     = filter(b,a,s);


% Design and apply the bandpass filter
order    = 10;
fcutlow  = 1000;
fcuthigh = 2000;
[b,a]    = butter(order,[fcutlow,fcuthigh]/(fs/2), 'bandpass');
x        = filter(b,a,s);

关于matlab - MATLAB 中的低通/带通滤波器设计,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10642224/

相关文章:

matlab - 在 MATLAB 中使用网格

matlab - 如何选择面积最大的物体?

multithreading - 使用 SendMessage 的线程通信

php/c++ - PHP 和 C++ 客户端(REST、套接字等)之间通信的最佳方法

c# - C# 中的 IIR 低通滤波器在 x86 模式下中断

android - GPS轨迹,计算高差

matlab - 破译在 http ://stackoverflow. com/a/13135833/560821 中找到的函数句柄解决方案

matlab - matlab中NaN的准确值是多少?

java - JSlider 卡住程序

android - Android 中带低通滤波器的加速度计