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 --- 62/CH1/EX1.5.d/ex_1_5d.sce | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 62/CH1/EX1.5.d/ex_1_5d.sce (limited to '62/CH1/EX1.5.d/ex_1_5d.sce') diff --git a/62/CH1/EX1.5.d/ex_1_5d.sce b/62/CH1/EX1.5.d/ex_1_5d.sce new file mode 100755 index 000000000..26009f1ff --- /dev/null +++ b/62/CH1/EX1.5.d/ex_1_5d.sce @@ -0,0 +1,30 @@ +//ex_5 d even and odd signals of x(t) +clear; +clc; +close; +t=0:5; +x=[ 0 2 4 2 0 0]; +figure +a=gca(); +plot2d3(t,x) +plot(t,x,'r.') +xtitle('x[n]','n') +a.thickness=2; +figure +a=gca(); +t2=-5:5 ; +y=[ x($:-1:2)./2 x(1) x(2:6)./2 ] +plot2d3(t2,y) +plot(t2,y,'r.') +xtitle('even','n') +a.y_location='right'; +a.thickness=2; +figure +a=gca(); +z=[ -x($:-1:2)./2 0 x(2:6)./2 ] +plot2d3(t2,z) +plot(t2,z,'r.') +xtitle('odd','n') +a.y_location='right'; +a.x_location='origin'; +a.thickness=2; -- cgit