summaryrefslogtreecommitdiff
path: root/692/CH4/EX4.8
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /692/CH4/EX4.8
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '692/CH4/EX4.8')
-rwxr-xr-x692/CH4/EX4.8/P4_8.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/692/CH4/EX4.8/P4_8.sce b/692/CH4/EX4.8/P4_8.sce
new file mode 100755
index 000000000..11adcf481
--- /dev/null
+++ b/692/CH4/EX4.8/P4_8.sce
@@ -0,0 +1,27 @@
+//EXAMPLE 4.8
+//Determine the order of Analog Elliptic LP filter.
+clc;
+clear;
+ap = 1 //dB
+as = 40 //dB
+Fp = 1000 //Hz
+Fs = 5000 //Hz
+wp = Fp*2*%pi;
+ws = Fs*2*%pi;
+
+
+k1 = 1/(sqrt((10^(0.1* as)-1)/(10^(0.1*ap)-1)));
+disp(1/k1,'1/k1 = ');
+k = wp/ws;
+k2 = sqrt(1 - (k*k));
+disp(k2,"k2 = ");
+po = (1 - sqrt(k2))/(2*(1 + sqrt(k2)));
+disp(po,'po = ');
+p = po +2*po^5 + 15*po^9 + 150*po^13;
+disp(p,'p = ');
+N = (2*log10(4/k1))/log10(1/p);
+disp(N,'N = ');
+disp('Since order of the filter is always an integer, ');
+disp(ceil(N),'Order of the filter is, N = ');
+
+