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 CenterFile Exchange에서 Analog Filters에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by