diff options
Diffstat (limited to '62/CH6/EX6.50/ex_6_50.sce')
-rwxr-xr-x | 62/CH6/EX6.50/ex_6_50.sce | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/62/CH6/EX6.50/ex_6_50.sce b/62/CH6/EX6.50/ex_6_50.sce new file mode 100755 index 000000000..7234437d9 --- /dev/null +++ b/62/CH6/EX6.50/ex_6_50.sce @@ -0,0 +1,53 @@ +close; +clc; +clear; +n=0:3; +x=cos(%pi*n/2); +subplot(4,1,1) +plot2d3(n,x) +xtitle('x[n]','n') +a=gca(); +a.x_location="origin"; +a.y_location="right"; +poly1=a.children.children; +poly1.thickness=3; +poly1.foreground=2; +plot(n,x,'r.') +subplot(4,1,2) +h=.5^n; +plot2d3(n,h); +xtitle('h[n]','n') +a=gca(); +a.x_location="origin"; +a.y_location="right"; +poly1=a.children.children; +poly1.thickness=3; +poly1.foreground=2; +plot(n,h,'r.') +y=convol(x,h) +subplot(4,1,3) +plot2d3(n,y(1:4)); +xtitle('y[n]','n') +plot(n,y(1:4),'r.') +a=gca(); +a.x_location="origin"; +a.y_location="right"; +poly1=a.children.children; +poly1.thickness=3; +poly1.foreground=2; +clear y; +X=dft(x,-1); +H=dft(h,-1); +Y=H.*X; +y=dft(Y,1); +subplot(4,1,4) +plot2d3(n,y); +xtitle('y[n]','n') +plot(n,y,'r.') +a=gca(); +a.x_location="origin"; +a.y_location="right"; +poly1=a.children.children; +poly1.thickness=3; +poly1.foreground=2; +plot(n,x,'r.') |