フィルターのクリア

Why do I get the error "Too many input arguments"

2 ビュー (過去 30 日間)
minsoo kim
minsoo kim 2017 年 12 月 8 日
コメント済み: Abhinaba Dey 2018 年 3 月 11 日
my_recorder = audiorecorder;
recordblocking(my_recorder,2)
x= getaudiodata(my_recorder);
LPF0=LPF;
x0=filter(LPF0,Num_LPF,1,x);
Code written above is my matlab code.
But when I activated this, "Too many input arguments" message is shown on the command window.
How can I solve this problem?
function Hd = LPF
% MATLAB Code
% Generated by MATLAB(R) 9.2 and the Signal Processing Toolbox 7.4.
% Generated on: 08-Dec-2017 11:47:53
% Equiripple Lowpass filter designed using the FIRPM function.
% All frequency values are in Hz.
Fs = 48000; % Sampling Frequency
Fpass = 200; % Passband Frequency
Fstop = 300; % Stopband Frequency
Dpass = 0.057501127785; % Passband Ripple
Dstop = 0.0001; % Stopband Attenuation
dens = 20; % Density Factor
% Calculate the order from the parameters using FIRPMORD.
[N, Fo, Ao, W] = firpmord([Fpass, Fstop]/(Fs/2), [1 0], [Dpass, Dstop]);
% Calculate the coefficients using the FIRPM function.
b = firpm(N, Fo, Ao, W, {dens});
Hd = dfilt.dffir(b);
% [EOF]
and this is my LPF.
  2 件のコメント
KSSV
KSSV 2017 年 12 月 8 日
Which line shows the error? How did you run the code? It doesn't show any error in my pc.
minsoo kim
minsoo kim 2017 年 12 月 8 日
error occurs at x0=filter(LPF0,Num_LPF,1,x);
And I entered "crtl+enter"

サインインしてコメントする。

回答 (1 件)

Honglei Chen
Honglei Chen 2017 年 12 月 8 日
It should just be
x0=filter(LPF0,x);
the coefficients is already in LPF0.
HTH
  1 件のコメント
Abhinaba Dey
Abhinaba Dey 2018 年 3 月 11 日
Error using filter2 Too many input arguments.
Error in find_sift (line 48) I_X = filter2(G_X, I, 'same'); % vertical edges
I get the same error. How can I solve it??

サインインしてコメントする。

カテゴリ

Help Center および File Exchange디지털 필터 설계 についてさらに検索

Community Treasure Hunt

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

Start Hunting!