Problem with a high pass filter
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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);
0 comentarios
Respuestas (2)
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);
0 comentarios
Ver también
Categorías
Más información sobre Filter Design en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!