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 /40/CH8/EX8.5b/Exa_8_5b.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 '40/CH8/EX8.5b/Exa_8_5b.sce')
-rwxr-xr-x | 40/CH8/EX8.5b/Exa_8_5b.sce | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/40/CH8/EX8.5b/Exa_8_5b.sce b/40/CH8/EX8.5b/Exa_8_5b.sce new file mode 100755 index 000000000..05c7e80c0 --- /dev/null +++ b/40/CH8/EX8.5b/Exa_8_5b.sce @@ -0,0 +1,42 @@ +//b1)modulation
+XDFT=[4 -2*%i 0 2*%i];
+xn=dft(XDFT,1)
+for i=1:length(xn)
+ zn(i)=xn(i)*%e^((%i*%pi*(i-1))/2);
+end
+disp(zn,'The IDFT of XDFT[k-1] is');
+ZDFT=[2*%i 4 -2*%i 0];
+zn1=dft(ZDFT,1)
+//b2)periodic convolution
+HDFT=(convol(XDFT,XDFT))
+HDFT=[HDFT,zeros(8:12)];
+HDFT=[HDFT(1:4);HDFT(5:8);HDFT(9:12)];
+HDFT1=[0 0 0 0];
+for i=1:4
+ for j=1:3
+ HDFT1(i)=HDFT1(i)+HDFT(j,i);
+ end
+end
+HDFT1;
+hn=dft(HDFT1,1)
+hn1=4*(xn.*xn);
+disp(hn1,'The IDFT of XDFT*XDFT is');
+//b3)product
+WDFT=XDFT.*XDFT;
+wn=dft(WDFT,1)
+wn1=convol(xn,xn);
+wn1=[wn1,zeros(8:12)];
+wn1=[wn1(1:4);wn1(5:8);wn1(9:12)];
+WN=[0 0 0 0];
+for i=1:4
+ for j=1:3
+ WN(i)=WN(i)+wn1(j,i);
+ end
+end
+disp(WN,'The IDFT of XDFT.XDFT is');
+//b4)Central ordinates and signal Energy
+E=0;
+for i=1:length(xn)
+ E=E+abs(xn(i)^2);
+end
+disp(E,'the signal energy is');
\ No newline at end of file |