필터 지우기
필터 지우기

Zero order hold filter using filter()

조회 수: 6 (최근 30일)
Nathan Nordbrock
Nathan Nordbrock 2016년 11월 5일
편집: Kushagr Gupta 2016년 11월 9일
I am trying to filter an audio signal using a zero order hold filter. Using the code below I get an error saying denominator filter coefficient must be non-zero. My question is am I using the correct inputs for freqz() and filter() to get my desired signal out?
Wn = [0.7];
L = 4;
n = 80;
y = audioread('voice_samp_8k.wav');
yup = kron(L,y); %upsample signal
[H,w]=freqz(sin(Wn.*L.*.5).*exp(-j.*Wn.*L.*.5), sin(Wn.*.5),2^18); %freqz of fourier transform of zero order hold
yfilt = filter(w, 1, yup);
plot(y,'r');
hold on
plot(yfilt,'b')

답변 (1개)

Kushagr Gupta
Kushagr Gupta 2016년 11월 9일
편집: Kushagr Gupta 2016년 11월 9일
I ran the code provided and did not receive any error and got a plot at the end.
Provide us with what is the error message that you receive along with the MATLAB version and OS being used as that might help us to figure out what might be going wrong!

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by