From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 40/CH8/EX8.9c/Exa_8_9c.sce | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 40/CH8/EX8.9c/Exa_8_9c.sce (limited to '40/CH8/EX8.9c/Exa_8_9c.sce') diff --git a/40/CH8/EX8.9c/Exa_8_9c.sce b/40/CH8/EX8.9c/Exa_8_9c.sce new file mode 100755 index 000000000..67632bb96 --- /dev/null +++ b/40/CH8/EX8.9c/Exa_8_9c.sce @@ -0,0 +1,15 @@ +//DFT and DFS of sinusoids +n2=0:1/840:6/21; +xt=4*sin(72*%pi*n2')-6*cos(12*%pi*n2'); +n=0:1/21:6/21;//F=3/12 hence N=12 +xn=4*sin(72*%pi*n')-6*cos(12*%pi*n'); +XDFT=abs(dft(xn,-1)); +n1=0:6; +a=gca(); +a.x_location="origin"; +plot2d(n2,xt); +plot2d3('gnn',n,xn); +xset('window',1); +b=gca(); +b.x_location="origin"; +plot2d3('gnn',n1,XDFT); -- cgit