Can someone tell me why do I get an error: Error using cheb2ord (line 69) The cutoff frequencies must be within the interval of (0,1).
I have normalized the frequencies by fn so what's the deal?
clear all;
close all;
clc;
fs=2600;
fn=fs/2;
ws=[0 1300]/fn;
wp=[710 839]/fn;
rp=0.1;
rs=25;
[n,wn]=cheb2ord(wp,ws,rp,rs);
[nz,dz] = cheby2(n,rs,wn,'pass');

 Accepted Answer

Walter Roberson
Walter Roberson on 9 Jun 2018
Edited: Walter Roberson on 9 Jun 2018

0 votes

(0,1) indicates 0 to 1 exclusive. Your ws is exactly 0 and exactly 1.
Also, you probably need 'bandpass' on your cheby2 instead of 'pass'

4 Comments

Nikolay Megdanov
Nikolay Megdanov on 9 Jun 2018
Edited: Nikolay Megdanov on 9 Jun 2018
ok but what if my assignment requires the stopband's boundaries to be at 0 and 1300 ?
Yeah I fixed the bandpass on the cheby2.
1/0 and infinity divided by infinity would be involved in the calculation. If you were to try to pursue the mathematical formula you would end up with point theoretically undefined (except possibly in limit.)
So what should I do, I just make the stopband boundaries to 1 and 1299 ?
Nevermind, I found I messed up the frequencies I was thinking should be placed there, thanks for the answers!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!