⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fir.m

📁 浮点fir设计工具
💻 M
字号:
%       AccelDSP 9.1.00 build 868 Production, compiled Feb 16 2007 
% 
%    THIS IS UNPUBLISHED, LICENSED SOFTWARE THAT IS THE CONFIDENTIAL 
%        AND PROPRIETARY PROPERTY OF XILINX OR ITS LICENSORS 
% 
%      Copyright(c) Xilinx, Inc., 2000-2007, All Rights Reserved. 
%   Reproduction or reuse, in any form, without the explicit written 
%          consent of Xilinx, Inc., is strictly prohibited. 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Description : Function definition for general FIR filter design            %
%%                                                                            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function outdatabuf=fir(indatabuf)

% Load the filter coefficients
coeff = load('coefficients.txt');

persistent tap_delay;

% Clear tap delay line at beginning
if isempty(tap_delay)
  tap_delay = zeros(1,length(coeff));
end

% Perform sum of products
outdatabuf = tap_delay * coeff(end:-1:1)';

% Shift tap delay line
tap_delay = [tap_delay(2:length(coeff)) indatabuf];


⌨️ 快捷键说明

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