フィルターのクリア

can anybody help me with these 2 functions ??? actually i have 2 change dis code such that it only allows even window size .pls help me with matlab code

1 回表示 (過去 30 日間)
function [zfSig]=zeroFreqFilter(wav,fs,winLength) dwav=diff(wav); dwav(end+1)=dwav(end); dwav=dwav/max(abs(dwav)); N=length(dwav); zfSig=cumsum(cumsum(cumsum(cumsum(dwav)))); winLength=round(winLength*fs/1000); zfSig=remTrend(zfSig,winLength); zfSig=remTrend(zfSig,winLength); zfSig=remTrend(zfSig,winLength); zfSig(N-winLength*2:N)=0; zfSig(1:winLength*2)=0; function [out]=remTrend(sig,winSize)
window=ones(winSize,1); rm=conv(sig,window); rm=rm(winSize/2:length(rm)-winSize/2);
norm=conv(ones(size(sig)),window); norm=norm(winSize/2:length(norm)-winSize/2);
rm=rm./norm; out=sig-rm; return;

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by