besself does not plot correctly

2 ビュー (過去 30 日間)
Lucas Mckeehan
Lucas Mckeehan 2020 年 7 月 7 日
コメント済み: Lucas Mckeehan 2020 年 7 月 8 日
When i run my filter command, the output plots stop at 1.5kz. This code works fine on Chebychev and Elliptic filters, but Bessel which is simpler seems to not work.
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 7 月 7 日
What are sample inputs?
Lucas Mckeehan
Lucas Mckeehan 2020 年 7 月 7 日
either BesselSim('Cutoff', 3, 2*pi*10e3: 2*pi*5e3:2*pi*45e3)
or BesselSim('Cutoff', 1:1:13,2*pi*45e3)

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

採用された回答

Walter Roberson
Walter Roberson 2020 年 7 月 8 日
You use freqs(bn, an, 1e6) . That asks it to pick out 10^6 frequencies, but it does not say anything about the range to pick the frequencies from.
For the first two sets of data, b has 3 poles, one of which is real, and the other are complex conjugates with absolute values less than 1e5. That combination leads to 1e6 being chosen as the last frequency.
For the third (and remaining) sets of data, b has 3 poles, one of which is real, and the others are complex conjugates in which the absolute values are greater than 1e5. For whatever reasons, the frequency interpolation routine freqint() discards the ones greater with absolute values greater than 1e5, and that leads to 10000 as the last frequency to be generated.
The work-around is to pass in a vector of frequencies instead of the number of frequencies to generate.
  1 件のコメント
Lucas Mckeehan
Lucas Mckeehan 2020 年 7 月 8 日
added 2*pi*logspace(0,6,1e6) in place of the existing 1e6, thanks so much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnalog Filters についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by