From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 692/CH10/EX10.2/P10_2.sce | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 692/CH10/EX10.2/P10_2.sce (limited to '692/CH10/EX10.2/P10_2.sce') diff --git a/692/CH10/EX10.2/P10_2.sce b/692/CH10/EX10.2/P10_2.sce new file mode 100755 index 000000000..f1956eec0 --- /dev/null +++ b/692/CH10/EX10.2/P10_2.sce @@ -0,0 +1,19 @@ +//Example 10.01 +// Order estimation using Bellanger's formula +clear; +clc; +Fp=1800;//Passband edge freq. in Hz +Fs=2000;//stopband edge freq. in Hz +ap=0.1;//peak passband ripple in dB +as=35;//min. stopband attenuation in dB +FT=12000;//Sampling freq. in Hz + +//calculation of peak ripple values +dp=1-10^-(ap/20); +disp(dp,'dp = '); +ds=10^-(as/20); +disp(ds,'ds = '); + +//Order of the FIR filter +N=((-2*log10(10*ds*dp)) /((3)*(Fs-Fp)/FT)) -1 ; +disp(ceil(N),'Order of the filter is N = ') -- cgit