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

📄 fspe.m

📁 A MATLAB tool for analysis of Transient Otoacoustic Emission signals
💻 M
字号:
function    y=fspe(B,A,x,fs,bw) 

%FSPE filters the input data with filters in filterbank . 
%   
%       y=fspe(B,A,x) 
%
%       y=fspe(B,A,x,fs,bw) to smooth squared time signals with 
%                           length fs/bw gauss-window
%
%  in:  B,A     filter coefficients G(z)=B(z)/A(z) in filterbanks
%       x       signal to be filtered
%       fs      sampling frequency
%       bw      bandwidths of the filters (Hz)
%
% out:  y       matrix containing the filtered signals as columns

% (c) Pekka Kumpulainen 16.6.1993 (PK 4.8.-93)
% PK 2.10.1997 localfrfilt

[M,N]=size(x);
if M<N; x=x.';M=N; end;
y=zeros(M,A(2));xz=[x;zeros(512,1)];tmp=zeros(M+512,1);

for ii=1:A(2);
%  tmp(:)=filtfilt(getmat(B,ii),getmat(A,ii),xz);
  tmp(:)=localfrfilt(getmat(B,ii),getmat(A,ii),xz);
  y(:,ii)=tmp(1:M);
end 

if nargin == 5 
        
  %smrf1=zeros(size(rf1));
  for ii=1:length(bw);
    %smrf1(:,ii)=smooth(rf1(:,ii).^2,gaussw(fs/bw(ii)));
    y(:,ii)=smooth(y(:,ii).^2,gaussw(fs/bw(ii)));
  end
end

%%%%%%%%%%%%%%%%%%%
%%% localfrfilt %%%
%%%%%%%%%%%%%%%%%%%
function y = localfrfilt(b,a,x)

y = filter(b,a,x);
y = filter(b,a,y(end:-1:1));
y = y(end:-1:1);

⌨️ 快捷键说明

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