summaryrefslogtreecommitdiff
path: root/40/CH9/EX9.10c/Exa_9_10c.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /40/CH9/EX9.10c/Exa_9_10c.sce
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 '40/CH9/EX9.10c/Exa_9_10c.sce')
-rwxr-xr-x40/CH9/EX9.10c/Exa_9_10c.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/40/CH9/EX9.10c/Exa_9_10c.sce b/40/CH9/EX9.10c/Exa_9_10c.sce
new file mode 100755
index 000000000..ce7325884
--- /dev/null
+++ b/40/CH9/EX9.10c/Exa_9_10c.sce
@@ -0,0 +1,26 @@
+//Bilinear design of second order filters
+s=%s;z=%z;
+fo=40;Wo=2*%pi*fo/200;
+delf=2;S=25;
+delW=2*%pi*delf/200;
+B=cos(2*%pi*fo/200)
+K=0.557;
+C=K*tan(0.5*delW)
+HS=1/(s+1);
+HZ=horner(HS,(z^2-(2*B*z)+1)/(C*(z^2)-C))
+f=0:2:100;
+f1=35:0.5:45;
+HZ1=horner(HZ,exp(%i*2*%pi*f'/200));
+HZ2=horner(HZ,exp(%i*2*%pi*f1'/200));
+HZ1=abs(HZ1);
+HZ2=abs(HZ2);
+a=gca();
+a.x_location="origin";
+subplot(211);
+plot2d(f,HZ1);
+xlabel('Analog Frequency f[kHZ]');
+ylabel('Magnitude');
+xtitle('peaking filter fo=40HZ,delf=2HZ');
+subplot(212);
+plot2d(f1,HZ2);
+xtitle('Blowup of response 35HZ to 45HZ'); \ No newline at end of file