summaryrefslogtreecommitdiff
path: root/758/CH7/EX7.4/Ex_7_4.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /758/CH7/EX7.4/Ex_7_4.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 '758/CH7/EX7.4/Ex_7_4.sce')
-rwxr-xr-x758/CH7/EX7.4/Ex_7_4.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/758/CH7/EX7.4/Ex_7_4.sce b/758/CH7/EX7.4/Ex_7_4.sce
new file mode 100755
index 000000000..15ef34ce7
--- /dev/null
+++ b/758/CH7/EX7.4/Ex_7_4.sce
@@ -0,0 +1,19 @@
+//Example 7.4
+
+clc;clear;close;
+M=7;w=2*%pi/M;
+
+//Calculation of filter co-efficients
+k=[0 1 6];
+for n=0:M-1
+ h(n+1)=sum(exp(-%i*3*w*k).*exp(%i*w*k*n))/M;
+end
+h=clean(h);
+
+//Displaying filter co-efficients
+disp(M,'Filter Order M= ');
+disp('Filter co-efficients:');
+disp(h,'h(n)= ');
+
+plot2d3(h);
+title('Filter transfer function h(n)');xlabel('n-->'); \ No newline at end of file