summaryrefslogtreecommitdiff
path: root/62/CH6/EX6.49/ex_6_49.sce
diff options
context:
space:
mode:
Diffstat (limited to '62/CH6/EX6.49/ex_6_49.sce')
-rwxr-xr-x62/CH6/EX6.49/ex_6_49.sce110
1 files changed, 55 insertions, 55 deletions
diff --git a/62/CH6/EX6.49/ex_6_49.sce b/62/CH6/EX6.49/ex_6_49.sce
index b77ac4ead..0b630bc79 100755
--- a/62/CH6/EX6.49/ex_6_49.sce
+++ b/62/CH6/EX6.49/ex_6_49.sce
@@ -1,56 +1,56 @@
-close;
-clc;
-clear;
-n=0:10;
-N=8;
-for i=1:length(n)
- if n(i)==0 then
- delta(i)=1;
- else
- delta(i)=0;
- end
-end
-x=delta';
-subplot(2,1,1)
-plot2d3(n,x);
-a=gca();
-plot(n,x,'r.')
-poly1=a.children.children;
-poly1.thickness=3;
-poly1.foreground=2;
-xtitle('x[n]','n')
-X=dft(x,-1);
-Y=X(1:find(n==N)-1);
-subplot(2,1,2)
-plot2d3(n,[Y' 0 0 0]);
-a=gca();
-plot(n,[Y' 0 0 0],'r.')
-poly1=a.children.children;
-poly1.thickness=3;
-poly1.foreground=2;
-xtitle('X[k]','k')
-for i=1:length(n)
- if n(i)>=0 & n(i)<N then
- x(i)=1;
- else
- x(i)=0;
- end
-
-end
-figure
-subplot(2,1,1)
-plot2d3(n,x);
-plot(n,x,'r.')
-a=gca();
-poly1=a.children.children;
-poly1.thickness=3;
-poly1.foreground=2;
-xtitle('x[n]','n')
-subplot(2,1,2)
-plot2d3(n,round(dft(x,-1)));
-plot(n,round(dft(x,-1)),'r.')
-a=gca();
-poly1=a.children.children;
-poly1.thickness=3;
-poly1.foreground=2;
+close;
+clc;
+clear;
+n=0:10;
+N=8;
+for i=1:length(n)
+ if n(i)==0 then
+ delta(i)=1;
+ else
+ delta(i)=0;
+ end
+end
+x=delta';
+subplot(2,1,1)
+plot2d3(n,x);
+a=gca();
+plot(n,x,'r.')
+poly1=a.children.children;
+poly1.thickness=3;
+poly1.foreground=2;
+xtitle('x[n]','n')
+X=fft(x,-1);
+Y=X(1:find(n==N)-1);
+subplot(2,1,2)
+plot2d3(n,[Y 0 0 0]);
+a=gca();
+plot(n,[Y 0 0 0],'r.')
+poly1=a.children.children;
+poly1.thickness=3;
+poly1.foreground=2;
+xtitle('X[k]','k')
+for i=1:length(n)
+ if n(i)>=0 & n(i)<N then
+ x(i)=1;
+ else
+ x(i)=0;
+ end
+
+end
+figure
+subplot(2,1,1)
+plot2d3(n,x);
+plot(n,x,'r.')
+a=gca();
+poly1=a.children.children;
+poly1.thickness=3;
+poly1.foreground=2;
+xtitle('x[n]','n')
+subplot(2,1,2)
+plot2d3(n,round(fft(x,-1)));
+plot(n,round(fft(x,-1)),'r.')
+a=gca();
+poly1=a.children.children;
+poly1.thickness=3;
+poly1.foreground=2;
xtitle('X[k]','k') \ No newline at end of file