Problem with a high pass filter

3 visualizaciones (últimos 30 días)
Martin
Martin el 7 de Dic. de 2013
Comentada: Levi el 2 de Abr. de 2017
I would like to make a high pass filter so I have used fdatool for set up of it, which generated a function Hd, then I have imported everything to my source code but it doesn't work yet. I don't know why and can't to find and solve that problem.
function Hd = horni_propust_01
%HORNI_PROPUST_01 Returns a discrete-time filter object.
% MATLAB Code
% Generated by MATLAB(R) 8.2 and the Signal Processing Toolbox 6.20.
% Generated on: 07-Dec-2013 15:04:37
% Elliptic Highpass filter designed using FDESIGN.HIGHPASS.
% All frequency values are in Hz.
Fs = 48000; % Sampling Frequency
N = 10; % Order
Fpass = 1000; % Passband Frequency
Apass = 1; % Passband Ripple (dB)
Astop = 80; % Stopband Attenuation (dB)
% Construct an FDESIGN object and call its ELLIP method.
h = fdesign.highpass('N,Fp,Ast,Ap', N, Fpass, Astop, Apass, Fs);
Hd = design(h, 'ellip');
% [EOF]
[y,Fs,nBits]=wavread('def.wav');
left=y(:,1); % Left channel
right=y(:,2); % Right channel
hd = horni_propust_01;
fr = filter(hd,right);
zvuk = left - fr;
player = audioplayer(zvuk,Fs,nBits);
play(player);

Respuestas (2)

Wayne King
Wayne King el 7 de Dic. de 2013
Editada: Wayne King el 7 de Dic. de 2013
Please specify what you mean by "...I have imported everything to my source code but it doesn't work yet"
What error message are you seeing?
You should just be able to execute the following in the workspace to filter one channel of your .wav file.
Fs = 48000; % Sampling Frequency
N = 10; % Order
Fpass = 1000; % Passband Frequency
Apass = 1; % Passband Ripple (dB)
Astop = 80; % Stopband Attenuation (dB)
h = fdesign.highpass('N,Fp,Ast,Ap', N, Fpass, Astop, Apass, Fs);
Hd = design(h, 'ellip');
[y,Fs,nBits]=wavread('def.wav');
left=y(:,1); % Left channel
right=y(:,2); % Right channel
fr = filter(Hd,right);

Martin
Martin el 7 de Dic. de 2013
Editada: Martin el 7 de Dic. de 2013
There is no error.. I just didn't know how to use this function to work my code. Now its okay. I try to filter a voice from song..
  1 comentario
Levi
Levi el 2 de Abr. de 2017
Could you please share how you did it pls. thank you :)

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by