From f35ea80659b6a49d1bb2ce1d7d002583f3f40947 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:38:01 +0530 Subject: updated the code --- 40/CH8/EX8.9d/Exa_8_9d.sce | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to '40/CH8/EX8.9d/Exa_8_9d.sce') diff --git a/40/CH8/EX8.9d/Exa_8_9d.sce b/40/CH8/EX8.9d/Exa_8_9d.sce index 2d5d4b294..31c33c90d 100755 --- a/40/CH8/EX8.9d/Exa_8_9d.sce +++ b/40/CH8/EX8.9d/Exa_8_9d.sce @@ -1,15 +1,15 @@ -//DFT and DFS of sinusoids -n2=0:1/2400:23/240; -xt=1+4*sin(120*%pi*n2')+4*sin(40*%pi*n2'); -n=0:1/240:23/240;//F=9/32 hence N=32 -xn=1+4*sin(120*%pi*n')+4*sin(40*%pi*n'); -XDFT=abs(dft(xn,-1)); -n1=0:23; -a=gca(); -a.x_location="origin"; -plot2d(n2,xt); -plot2d3('gnn',n,xn); -xset('window',1); -b=gca(); -b.x_location="origin"; +//DFT and DFS of sinusoids +n2=0:1/2400:23/240; +xt=1+4*sin(120*%pi*n2')+4*sin(40*%pi*n2'); +n=0:1/240:23/240;//F=9/32 hence N=32 +xn=1+4*sin(120*%pi*n')+4*sin(40*%pi*n'); +XDFT=abs(fft(xn,-1)); +n1=0:23; +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); \ No newline at end of file -- cgit