signals1.m

来自「this file consists of many matlab progra」· M 代码 · 共 24 行

M
24
字号
% Butterworth Low Pass Filter

clc;
clear all;
close all;

f1 = input ('Enter the pass band freq : ');
f2 = input ('Enter the stop band freq : ');
fs = input ('Enter the sampling freq : ');

k1 = input ('Enter the pass band attn. : ');
k2 = input ('Enter the stop band attn. : ');

w1 =  2 * f1/fs;
w2 =  2 * f2/fs;

[n,wn] = buttord (w1,w2,k1,k2);
[b,a] = butter(n,wn);

figure ;
subplot (4,2,1);
freqz(b,a);
title ('Butter Worth LPF');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?