diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /716/CH9/EX9.2/Solved_Ex9_2.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '716/CH9/EX9.2/Solved_Ex9_2.sce')
-rwxr-xr-x | 716/CH9/EX9.2/Solved_Ex9_2.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/716/CH9/EX9.2/Solved_Ex9_2.sce b/716/CH9/EX9.2/Solved_Ex9_2.sce new file mode 100755 index 000000000..588f06e7c --- /dev/null +++ b/716/CH9/EX9.2/Solved_Ex9_2.sce @@ -0,0 +1,16 @@ +//compute 4 point DFT of signal x(n)={0,1,2,3}
+clc;
+clear;
+n=0:1:3;//for four point DFT
+x=[0 1 2 3];
+disp(x,'Given signal=> x(n)=');
+X=dft(x,-1);
+disp(X,'four point DFT of x(n)=>');
+disp(abs(X),'magnitude of four point DFT x(n)=>');
+disp(atan(imag(X),real(X)),'phase of four point DFT x(n)=>');
+subplot(1,2,1)
+plot2d3(n,abs(X),2);
+xtitle('Magnitude Spectrum','k','|X(k)|');
+subplot(1,2,2)
+plot2d3(n,atan(imag(X),real(X)),2);
+xtitle('Phase Spectrum','k','angle(X(k))');
\ No newline at end of file |