I am using the remez function in a Filter and impulse response exercise. It is however giving me an error "??? Index exceeds matrix dimensions." Below is the short code where the error is coming in:
N = 41; F = [0 F1 F2 1]; M = [0 0 1 1]; B = remez(N-1,F,M)
I am struggling to figure out what it is I am doing wrong

2 件のコメント

Nicko
Nicko 2012 年 9 月 25 日
Thank you Wayne for that answer. I will try that but to add on my info: Fstop=2005; Fcutoff=2500; F1=2*Fcutoff/Fs; F2=Fstop/Fs;
Nicko
Nicko 2012 年 9 月 25 日
Thanks again. My Fs=10000. I did what you suggested and still does not work. I'm starting to think the remez function I'm using might be the problem but not sure where to download a trusted one

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

 採用された回答

Wayne King
Wayne King 2012 年 9 月 25 日

0 投票

You have not told us what F1 and F2 are, so we cannot reproduce your problem.
But, something like:
N = 41;
F = [0 0.2 0.4 1];
M = [0 0 1 1];
B = remez(N-1,F,M);
will work.

1 件のコメント

Ismail Ouraich
Ismail Ouraich 2015 年 1 月 29 日
I ran you code, but I still got this error message: "Undefined function 'remez' for input arguments of type 'double' " . Any help with this would greatly appreciated.

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

その他の回答 (1 件)

Wayne King
Wayne King 2012 年 9 月 25 日

0 投票

You did not tell us what Fs is
Fstop=2005; Fcutoff=2500;
F1=2*Fcutoff/Fs; F2=Fstop/Fs;
but the potential problem is here that your F1 can be higher than your F2 value. Your frequencies have to be increasing in the frequency vector

カテゴリ

タグ

質問済み:

2012 年 9 月 25 日

コメント済み:

2015 年 1 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by