summaryrefslogtreecommitdiff
path: root/40/CH2/EX2.3a/Exa_2_3a.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /40/CH2/EX2.3a/Exa_2_3a.sce
downloadScilab-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/CH2/EX2.3a/Exa_2_3a.sce')
-rwxr-xr-x40/CH2/EX2.3a/Exa_2_3a.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/40/CH2/EX2.3a/Exa_2_3a.sce b/40/CH2/EX2.3a/Exa_2_3a.sce
new file mode 100755
index 000000000..1cf640075
--- /dev/null
+++ b/40/CH2/EX2.3a/Exa_2_3a.sce
@@ -0,0 +1,21 @@
+//example 2.3a pg.no.14
+clear;clc;close;
+n=-2:2;
+x1=[4 -2 4 -6 0];
+x2=0.5*x1//x[n]
+x3=0.5*[x1(length(x1):-1:1)];//x[-n]
+xe=(x2+x3);//even part
+xo=(x2-x3);//odd part
+a=gca();
+a.thickness=2;
+a.x_location="middle";
+a.y_location="middle";
+plot2d3('gnn',n,xe,rect=[-4 -6 4 6])
+xtitle('graphical representation of even part of x[n]','n','x[n]')
+xset('window',1)
+b=gca();
+b.thickness=2;
+b.y_location="middle";
+b.x_location="middle";
+plot2d3('gnn',n,xo,rect=[-2 -4 2 4])
+xtitle('graphical representation of odd part of x[n]','n','x[n]')