summaryrefslogtreecommitdiff
path: root/842/CH3/EX3.14/Example3_14.sce
diff options
context:
space:
mode:
Diffstat (limited to '842/CH3/EX3.14/Example3_14.sce')
-rwxr-xr-x842/CH3/EX3.14/Example3_14.sce33
1 files changed, 33 insertions, 0 deletions
diff --git a/842/CH3/EX3.14/Example3_14.sce b/842/CH3/EX3.14/Example3_14.sce
new file mode 100755
index 000000000..194af6bf5
--- /dev/null
+++ b/842/CH3/EX3.14/Example3_14.sce
@@ -0,0 +1,33 @@
+//clear//
+//Example3.14:DTFS
+//Finding x[n] using parseval's relation of DTFS
+clear;
+close;
+clc;
+N = 6;
+n = 0:N-1;
+a(1) = 1/3;
+a(2)=0;
+a(4)=0;
+a(5)=0;
+a1 = (1/6)*((-1)^n);
+x =0;
+for k = 0:N-2
+ if(k==2)
+ x = x+a1;
+ else
+ x = x+a(k+1);
+ end
+end
+x = [x($:-1:1),x(2:$)];
+n = -(N-1):(N-1);
+//
+figure
+a = gca();
+a.y_location = "origin";
+a.x_location = "origin";
+plot2d3('gnn',n,x,5)
+poly1 = a.children(1).children(1);
+poly1.thickness = 3;
+title('x[n]')
+xlabel(' n')