BandPass filter using ellipord
Show older comments
How do I use multiple normalized passband frequencies (Wp) and normalized stopband frequencies (Ws) in the ellipord function to create a bandpass filter? I need to create a bandpass filter using the ellipord function given more than one Wp and Ws. I have more than one of these variables because I have to use the the following frequencies to set the stopband (fs) and passbands (fp); fp1 = 700Hz, fp2 = 4.5kHz, fs1 = 300 Hz, and fs2 = 5.5kHz. The following code I tried does not work since I have to many inputs for the ellipord function:
[X Fs] = audioread('song.mp3');
Gp_b = .9
Gs_b = .01
Fp_b1 = 700
Fp_b2 = 4500
Fs_b1 = 300
Fs_b2 = 5500
Wp_b1 = (2*Fp_b1)/Fs
Ws_b1 = (2*Fs_b1)/Fs
Rp_b = -20*log10(Gp_b)
Rs_b = -20*log10(Gs_b)
Wp_b2 = (2*Fp_b2)/Fs
Ws_b2 = (2*Fs_b2)/Fs
[n_b, Wn_b] = ellipord(Wp_b1,Wp_b2,Ws_b1,Ws_b2,Rp_b,Rs_b)
Error using ellipord
Too many input arguments.
Accepted Answer
More Answers (0)
Categories
Find more on Digital Filter Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!