summaryrefslogtreecommitdiff
path: root/716/CH2/EX2.4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /716/CH2/EX2.4
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 '716/CH2/EX2.4')
-rwxr-xr-x716/CH2/EX2.4/MatLab_Prog_Ex2_4.sce50
1 files changed, 50 insertions, 0 deletions
diff --git a/716/CH2/EX2.4/MatLab_Prog_Ex2_4.sce b/716/CH2/EX2.4/MatLab_Prog_Ex2_4.sce
new file mode 100755
index 000000000..c250770d7
--- /dev/null
+++ b/716/CH2/EX2.4/MatLab_Prog_Ex2_4.sce
@@ -0,0 +1,50 @@
+//Perform Amplitude Scaling,Time Scaling and Time Shift on x(t)=1+t for t=0 to 2
+clc;
+clear;
+clf;
+t=-5:0.01:5;
+x=(1+t).*(t>=0&t<=2)
+
+//Amplitude Scaling
+xset('window',0);
+subplot(131)
+plot(t,x);
+xtitle('the original signal x(t)=1+t for 0<=t<=2','time t','signal x(t)');
+
+subplot(132)
+plot(t,5*x);
+xtitle('amplitude scaling of x(t)=t','time t','signal 5*x(t)');
+
+subplot(133)
+plot(t,0.5*x);
+xtitle('amplitude scaling of x(t)=t','time t','signal 0.5*x(t)');
+
+//Time Scaling
+xset('window',1);
+subplot(131)
+plot(t,x);
+xtitle('the original signal x(t)=1+t for 0<=t<=2','time t','signal x(t)');
+
+subplot(132)
+plot(t*2,x);
+xtitle('Time Scaling of x(t)','time 2*t','signal x(2t)');
+
+subplot(133)
+plot(t/2,x);
+xtitle('Time Scaling of x(t)','time t/2','signal x(t/2)');
+
+//Time Shifting
+xset('window',2)
+subplot(131)
+plot(t,x);
+xtitle('the original signal x(t)=1+t for 0<=t<=2','time t','signal x(t)');
+
+subplot(132)
+t=t+3;
+plot(t,x);
+xtitle('Time Shifting of x(t)','time t','signal x(t-3)');
+
+subplot(133)
+t=t-6;
+plot(t,x);
+xtitle('Time Shifting of x(t)','time t+3','signal x(t+3)'); \ No newline at end of file